XF 2.2 Using FlatContentPermissions

Sneedly39

New member
Hi,

Is there any documentation on using the XF\Permission\FlatContentPermissions class?
I'm trying to create a chat add-on and I'm trying to have per-chatroom permissions but I have absolutely no clue how permissions work.

Cheers.
 
It is relatively straight forward, but does require extensive knowledge of how XenForo permissions already work.
Example;

Overview of the functions;
  • getAnalysisTypeTitle/getContentList/getContentTitle
    • Is for the analyze permissions feature.
    • It assumes that the entire list of permissioned things can easily display in a select box. Otherwise it just doesn't do anything.
  • isValidPermission
    • Is used to filter from all valid permissions to the subset to be computed into the per-content permission hash-table.
    • This is applied to every permission definition.
  • getFinalPerms
    • Compiles the permissions into a flat key-value array from a <group><key><value> set.
    • Works on filtered permission definitions via isValidPermission
  • getFinalAnalysisPerms
    • Is for the analyze permissions feature.
    • Compiles the permissions into a list of flat key-value for display saying what has been done.
 
Back
Top Bottom