Changeset 965


Ignore:
Timestamp:
Jan 28, 2008, 2:35:36 PM (11 years ago)
Author:
Daniel Kahn Gillmor
Message:

jpdd: finetune permissions for editing usiners and categories.

Location:
trunk/jpdd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/jpdd/class.jpdd.person.php

    r964 r965  
    117117      $editaffiliations = '';
    118118      $editaudiences = '';
    119       // we'll use assigning roles as a decent proxy for being able to massage affiliations directly.
    120       if ($jpdd->_authenticated_user->HasAnyOfThesePrivileges('Assign Roles')) {
     119      // we'll use 'Edit Organizations' as a decent proxy for being able to massage affiliations directly.
     120      if ($jpdd->_authenticated_user->HasAnyOfThesePrivileges('Edit Organizations')) {
    121121        // this is the traditional way to show the affiliations:
    122122        $editaffiliations = $this->getM2MEditView('organization', 'affiliation', 'Affiliated With', 'Add Affiliation');
    123         // but we also want to include every role with each affiliation, if possible.
    124         // you must be able to edit roles to sign people up from this angle also:
     123      }
     124      // but we also want to include every role with each affiliation, if possible.
     125      // you must be able to manage signups to add people here:
     126      if ($jpdd->_authenticated_user->HasAnyOfThesePrivileges('Manage Signups')) {
    125127        $editaudiences = $this->getM2MEditView('workshop', 'audience', 'Attending', 'Sign up for', NULL, create_function('$x', 'global $jpdd; $full = false; '.($jpdd->_authenticated_user->HasAnyOfThesePrivileges('Manage Signups') ? ' if ($x->isFull()) $x->_title .= " (FULL)"; ' : '$full = $x->isFull(); ').' return $x->_event_id == $jpdd->getActiveEventID() && !$full;'));
    126128      }
  • trunk/jpdd/class.jpdd.php

    r950 r965  
    101101        if ($this->_authenticated_user->hasAllOfThesePrivileges('Send Broadcast'))
    102102          $links['E-mail Alert'] = 'broadcast';
    103         if ($this->_authenticated_user->hasAllOfThesePrivileges('Manage Signups'))
     103        if ($this->_authenticated_user->hasAnyOfThesePrivileges('Manage Signups', 'Edit Categories'))
    104104          $links['Subject Areas'] = 'category';
    105105        if ($this->_authenticated_user->hasAnyOfThesePrivileges(array('Assign Roles', 'Edit Roles')))
Note: See TracChangeset for help on using the changeset viewer.