#436 How can give area admin meeting approval

open
nobody
None
1
2014-02-10
2013-12-11
Ben George
No

HI

i am using mrbs 1.4.10 , i added nearly 15 areas. under each areas minimum 3 rooms are created. these 15 areas are located on different areas(not on same place). so these ares are handled by different persons. So how can create area admin for these 15 areas. because i need to change my MRBS to booking-approval mode.

i added

$auth["admin"][] = "ben.george";

like on config.php.ini file, but the thing is he is getting super access to all areas. If i add area admin email under area properties, only getting notification. Not getting approval request.

is there any way to do this either within MRBS, or my authentication method is LDAP. So can we do anything on AD to achieve this

thanks & Regards,
Ben

Discussion

  • It's not possible with standard MRBS. You could try using the ACL branch, which has the capability of doing this, but you'd probably need to work out how to use it yourself. Or else you could have an installation of MRBS for each area, but that's only really convenient if your users only ever want to book rooms in one area.

    Campbell

     
  • Ben George
    Ben George
    2014-02-06

    HI Campbell

    can you please help me to solve this.

    how can i set ACL branch?

    regards,
    Ben

     
  • It's probably easier to modify MRBS rather than use the ACL branch.

    You need to modify the function auth_book_admin() in mrbs_auth.inc.

    Here's an example:

    function auth_book_admin($user, $room)
    {
      $area_admins = array();
      $area_admins[2] = array('tom', 'dick', 'harry');  // example for area with id 2
      $this_area = get_area($room);
      if (in_array($user, $area_admins[$this_area]))
      {
        return TRUE;
      }
      return (authGetUserLevel($user) >= 2);
    }
    

    Campbell

     
  • Ben George
    Ben George
    2014-02-09

    HI Campbell,

    i was looking for this functionality from last 4 months.

    thanks for your reply

    i have modified my code like this

    function auth_book_admin($user, $room)
    {
      $area_admins = array();
      $area_admins[34] = array('svc_ocadmin');
      $this_area = get_area($room);
    
      if (in_array($user, $area_admins[$this_area]))
      {
        return TRUE;
      }
      return (authGetUserLevel($user) >= 2);
    }
    

    then i authenticated as super admin and changed the the booking property like " needs approval"

    Then as normal user i booked area 34, for that user it's showing "1 meeting is waiting for approval"

    But when i logined as svc_ocadmin, that booking status is showing "0 pending bookings"

    please help me to solve this

    thanks & Regards,
    Ben

    }
    ?>

     
  • Ben George
    Ben George
    2014-02-10

    Hi campbell,

    i was echo ing that values

    echo $this_area;
    echo $area;

    are not showing any values in my MRBS

    i put above code in that function. how can i trace that?

    i have given like below

      if ($user == "svc_ocadmin"){
    
            return TRUE;
      }
    

    seems like svc_ocadmin can approve bookings. but still its showing "0 pending bookings" while i logged in as svc_ocadmin

    i think $room value is not getting.

    please help me solve this

    Thanks & Regards
    Ben

     
  • Ben George
    Ben George
    2014-02-10

    HI Campbell,

    Finally i solved my issue.

    now i can able to create admins for areas.

    Thanks a lot for all your help

    Thanks & Regards,Ben

     


Anonymous


Cancel   Add attachments