| [ PHPXref.com ] | [ Generated: Sun Jul 20 16:45:19 2008 ] | [ Bumblebee 1.0.4 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Permission codes for actions 4 * 5 * @author Stuart Prescott 6 * @copyright Copyright Stuart Prescott 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License 8 * @version $Id: permissions.php,v 1.2 2006-01-16 23:52:33 stuart Exp $ 9 * @package Bumblebee 10 * @subpackage Misc 11 */ 12 13 $perm = 1; 14 // SYSTEM LEVEL FUNCTIONS: NORMAL USERS 15 /** Permission: Anyone can do it */ 16 define('BBPERM_USER_ALL', 1); 17 /** Permission: user can change their own password */ 18 define('BBPERM_USER_PASSWD', ($perm<<=1)); 19 /** Permission: user can masquerade as another user */ 20 define('BBPERM_MASQ', ($perm<<=1)); 21 22 // SYSTEM LEVEL FUNCTIONS: ADMIN USERS 23 /** Permission: Admin user required (a user *never* has this permission) */ 24 define('BBPERM_ADMIN', ($perm<<=1)); 25 /** Permission: Permission to edit groups */ 26 define('BBPERM_ADMIN_GROUPS', ($perm<<=1) | BBPERM_ADMIN); 27 /** Permission: Permission to edit projects */ 28 define('BBPERM_ADMIN_PROJECTS', ($perm<<=1) | BBPERM_ADMIN); 29 /** Permission: Permission to edit users */ 30 define('BBPERM_ADMIN_USERS', ($perm<<=1) | BBPERM_ADMIN); 31 /** Permission: Permission to edit instruments */ 32 define('BBPERM_ADMIN_INSTRUMENTS', ($perm<<=1) | BBPERM_ADMIN); 33 /** Permission: Permission to edit consumables */ 34 define('BBPERM_ADMIN_CONSUMABLES', ($perm<<=1) | BBPERM_ADMIN); 35 /** Permission: Permission to record consumable usage */ 36 define('BBPERM_ADMIN_CONSUME', ($perm<<=1) | BBPERM_ADMIN); 37 /** Permission: Permission to edit costs */ 38 define('BBPERM_ADMIN_COSTS', ($perm<<=1) | BBPERM_ADMIN); 39 /** Permission: Permission to view deleted bookings */ 40 define('BBPERM_ADMIN_DELETEDBOOKINGS', ($perm<<=1) | BBPERM_ADMIN); 41 /** Permission: Permission to collect email lists */ 42 define('BBPERM_ADMIN_EMAILLIST', ($perm<<=1) | BBPERM_ADMIN); 43 /** Permission: Permission to export data */ 44 define('BBPERM_ADMIN_EXPORT', ($perm<<=1) | BBPERM_ADMIN); 45 /** Permission: Permission to send out billing reports */ 46 define('BBPERM_ADMIN_BILLING', ($perm<<=1) | BBPERM_ADMIN); 47 /** Permission: Permission to backup database */ 48 define('BBPERM_ADMIN_BACKUPDB', ($perm<<=1) | BBPERM_ADMIN); 49 50 /** Permission: Admin user can do anything */ 51 define('BBPERM_ADMIN_ALL', -1); 52 53 // FINE-GRAINED INSTRUMENT PERMISSIONS 54 /** Permission: View instrument booking sheet */ 55 define('BBPERM_INSTR_VIEW', $perm=1); 56 /** Permission: View instrument booking sheet without restrictions on viewing future bookings */ 57 define('BBPERM_INSTR_VIEW_FUTURE', ($perm<<=1)); 58 /** Permission: Book instrument */ 59 define('BBPERM_INSTR_BOOK', ($perm<<=1)); 60 /** Permission: Book instrument any time into the future */ 61 define('BBPERM_INSTR_BOOK_FUTURE', ($perm<<=1)); 62 /** Permission: Book instrument without timeslot restrictions */ 63 define('BBPERM_INSTR_BOOK_FREE', ($perm<<=1)); 64 /** Permission: Delete own bookings with appropriate notice */ 65 define('BBPERM_INSTR_UNBOOK', ($perm<<=1)); 66 /** Permission: Delete own bookings without restrictions for appropriate notice */ 67 define('BBPERM_INSTR_UNBOOK_PAST', ($perm<<=1)); 68 /** Permission: Delete others' bookings */ 69 define('BBPERM_INSTR_UNBOOK_OTHER', ($perm<<=1)); 70 71 /** Permission: Instrument admin all functions */ 72 define('BBPERM_INSTR_ALL', -1); 73 74 75 76 77 // print 'BBPERM_USER_ALL='.BBPERM_USER_ALL.'<br/>'; 78 // print 'BBPERM_USER_PASSWD='.BBPERM_USER_PASSWD.'<br/>'; 79 // print 'BBPERM_MASQ='.BBPERM_MASQ.'<br/>'; 80 // print 'BBPERM_ADMIN='.BBPERM_ADMIN.'<br/>'; 81 // print 'BBPERM_ADMIN_GROUPS='.BBPERM_ADMIN_GROUPS.'<br/>'; 82 // print 'BBPERM_ADMIN_PROJECTS='.BBPERM_ADMIN_PROJECTS.'<br/>'; 83 // print 'BBPERM_ADMIN_USERS='.BBPERM_ADMIN_USERS.'<br/>'; 84 // print 'BBPERM_ADMIN_INSTRUMENTS='.BBPERM_ADMIN_INSTRUMENTS.'<br/>'; 85 // print 'BBPERM_ADMIN_CONSUMABLES='.BBPERM_ADMIN_CONSUMABLES.'<br/>'; 86 // print 'BBPERM_ADMIN_CONSUME='.BBPERM_ADMIN_CONSUME.'<br/>'; 87 // print 'BBPERM_ADMIN_COSTS='.BBPERM_ADMIN_COSTS.'<br/>'; 88 // print 'BBPERM_ADMIN_DELETEDBOOKINGS='.BBPERM_ADMIN_DELETEDBOOKINGS.'<br/>'; 89 // print 'BBPERM_ADMIN_EMAILLIST='.BBPERM_ADMIN_EMAILLIST.'<br/>'; 90 // print 'BBPERM_ADMIN_EXPORT='.BBPERM_ADMIN_EXPORT.'<br/>'; 91 // print 'BBPERM_ADMIN_BILLING='.BBPERM_ADMIN_BILLING.'<br/>'; 92 // print 'BBPERM_ADMIN_BACKUPDB='.BBPERM_ADMIN_BACKUPDB.'<br/>'; 93 // print 'BBPERM_ADMIN_ALL='.BBPERM_ADMIN_ALL.'<br/>'; 94 95 96 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |