isValid() ) { if (!$gBitUser->isAdmin()) { $ppps = array( 'bit_p_view', 'bit_p_edit', 'bit_p_rollback', 'bit_p_remove', 'bit_p_rename', 'bit_p_lock', 'bit_p_admin_wiki', 'bit_p_view_attachments' ); // If we are in a page then get individual permissions foreach( array_keys( $gBitUser->mPerms ) as $perm ) { if (in_array($perm, $ppps)) { // Check for individual permissions if this is a page if ($gBitUser->object_has_one_permission($gContent->mContentId, BITPAGE_CONTENT_TYPE_GUID )) { if ($gBitUser->object_has_permission($gBitUser->mUserId, $gContent->mContentId, BITPAGE_CONTENT_TYPE_GUID, $perm)) { $$perm = 'y'; $gBitSmarty->assign("$perm", 'y'); } else { $$perm = 'n'; $gBitSmarty->assign("$perm", 'n'); } } } else { $$perm = 'y'; $gBitSmarty->assign("$perm", 'y'); } } } } ?>