Changeset 26278


Ignore:
Timestamp:
06/05/10 10:21:57 (7 years ago)
Author:
flack
Message:

Only load owner privileges if we actually need them, refs #1848

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ragnaroek/midcom/midcom.core/midcom/core/privilege.php

    r26277 r26278  
    747747        // assigned to a single object.
    748748        $valid_privileges = array();
    749         $valid_privileges[MIDCOM_PRIVILEGE_SCOPE_OWNER] = $_MIDCOM->auth->get_owner_default_privileges();
    750 
    751749
    752750        $object_privileges = midcom_core_privilege::get_content_privileges($guid);
     
    819817
    820818        ksort($valid_privileges);
     819
    821820        // Process owner privileges
    822         if (! $is_owner)
    823         {
    824             // Drop the owner privileges from the merging chain again, we are not an owner
    825             unset ($valid_privileges[MIDCOM_PRIVILEGE_SCOPE_OWNER]);
     821        if ($is_owner)
     822        {
     823            $valid_privileges[MIDCOM_PRIVILEGE_SCOPE_OWNER] = $_MIDCOM->auth->get_owner_default_privileges();
    826824        }
    827825
Note: See TracChangeset for help on using the changeset viewer.