Custom Filebase Permissions

  • Hey there,


    I have installed an addon which counts the number of Jobs submitted by a user and saves this as an integer value in the users table in its own column. However, I now need to do some permissions checks on this DB value from the filebase using a custom field which I have added, which states the number of jobs required for the user to be able to download the file.


    What would be the easiest way to go about this? If any further clarification is required, let me know.

  • I have figured out that the easiest way I can see of doing this is by using user groups and the automatic assignments feature. However, how should I go about now adding the 'Accepted Jobs' db value in the wcf1_user table as a condition for the automatic assignment?

  • However, how should I go about now adding the 'Accepted Jobs' db value in the wcf1_user table as a condition for the automatic assignment?

    For such a condition you need to register an object type by using the objectType-Pip.

    XML: objectType.xml
    <type>
    <name>com.example.wcf.acceptedJobs</name>
    <definitionname>com.woltlab.wcf.condition.userGroupAssignment</definitionname>
    <classname>wcf\system\condition\UserIntegerPropertyCondition</classname>
    <conditiongroup>contents</conditiongroup>
    <propertyname>acceptedJobs</propertyname>
    <minvalue>0</minvalue>
    </type>