plugins/gallery/nssetup.php
changeset 42 7c6e2e97aa08
parent 18 c1c398349651
equal deleted inserted replaced
41:0944c9354e9c 42:7c6e2e97aa08
    14 
    14 
    15 $plugins->attachHook('acl_rule_init', 'gallery_setup_namespace($this);');
    15 $plugins->attachHook('acl_rule_init', 'gallery_setup_namespace($this);');
    16 
    16 
    17 function gallery_setup_namespace(&$paths)
    17 function gallery_setup_namespace(&$paths)
    18 {
    18 {
    19   global $db, $session, $paths, $template, $plugins; // Common objects
    19 	global $db, $session, $paths, $template, $plugins; // Common objects
    20   
    20 	
    21   $paths->create_namespace('Gallery', 'Image:');
    21 	$paths->create_namespace('Gallery', 'Image:');
    22   
    22 	
    23   $session->register_acl_type('gal_full_res', AUTH_ALLOW, 'View image at full resolution', array('read'), 'Gallery');
    23 	$session->register_acl_type('gal_full_res', AUTH_ALLOW, 'View image at full resolution', array('read'), 'Gallery');
    24   $session->register_acl_type('snapr_add_tag', AUTH_DISALLOW, 'Add image tags (separate from adding normal tags)', array('read'), 'Gallery');
    24 	$session->register_acl_type('snapr_add_tag', AUTH_DISALLOW, 'Add image tags (separate from adding normal tags)', array('read'), 'Gallery');
    25   
    25 	
    26   $session->acl_extend_scope('read',                   'Gallery', $paths);
    26 	$session->acl_extend_scope('read',                   'Gallery', $paths);
    27   $session->acl_extend_scope('post_comments',          'Gallery', $paths);
    27 	$session->acl_extend_scope('post_comments',          'Gallery', $paths);
    28   $session->acl_extend_scope('edit_comments',          'Gallery', $paths);
    28 	$session->acl_extend_scope('edit_comments',          'Gallery', $paths);
    29   $session->acl_extend_scope('mod_comments',           'Gallery', $paths);
    29 	$session->acl_extend_scope('mod_comments',           'Gallery', $paths);
    30 }
    30 }
    31 
    31 
    32 ?>
    32 ?>