Node Permissions

  • Thread starter Thread starter ragtek
  • Start date Start date
R

ragtek

Guest
Is there a way to access "all permissions" for pages?

I've created a page and set ALL permissions (can view, forum perms ,forum mod perms,gallery perms, article perms,...)

If i try to access the perms via
PHP:
  public function canEditComment(array $comment,&$errorPhraseKey = '', array $nodePermissions = null, array $viewingUser = null)
    {
        $this->standardizeViewingUserReferenceForNode($comment['node_id'], $viewingUser, $nodePermissions);

        if (!$viewingUser['user_id'])
        {
            return false;
        }

        if (XenForo_Permission::hasContentPermission($nodePermissions, 'editAnyPost'))
        {
            return true;
        }

        if ($comment['user_id'] == $viewingUser['user_id'] && XenForo_Permission::hasContentPermission($nodePermissions, 'editOwnPost'))
        {

BUT the only perm i can access here is the "view permission"
Is this because of the nodetype permission_group_id ?
Can I manipulate this?

I've finished my xenforo page comment system, but i'm not able to set the permissions, because i can access only the view permission
 
Node types (can) have a permission group attached to them. The only permissions exposed on a per node basis are in that group.

You'll need to set the permission group for pages to the group that you need and then it should become available.
 
So i need to edit the permission_group_id value in xf_node_type to forum?

hm, i think i have to find an other way for this, i don't want to change original xenforo values:D
 
Global Permissions aren't possible because i want to define them for the page node.
(can view page, can manage page comments, can create page comments, can edit own page comments, can edit all page comments,..)

What could be the worst case scenario, if i change the original group id?

if you upgrade this in an future release, it would break the page node permissions, until i release a new addon version with the upgraded node permissions, right?
 
if you upgrade this in an future release, it would break the page node permissions, until i release a new addon version with the upgraded node permissions, right?
I believe that would be all that happened.
 
Top Bottom