function live_css_permission in Live CSS 7.2
Same name and namespace in other branches
- 8.2 live_css.module \live_css_permission()
- 8 live_css.module \live_css_permission()
- 7 live_css.module \live_css_permission()
Implements hook_permission().
Permissions available are: 'edit css limited'
- Restrict access to specific folder(s)/file(s) using a Regular Expression (RegEx) available on the configuration page.
'edit css'
- Full access to all CSS files (given that they have a correct set of filesystem permissions for writing by the server).
'edit css admin'
- Full access to CSS files and allows editing of configuration.
File
- ./
live_css.module, line 42 - Allows editing and a live view of all changes in real-time in the browser.
Code
function live_css_permission() {
return array(
'edit css admin' => array(
'title' => t('Administer Live CSS settings'),
'restrict acess' => TRUE,
'warning' => t('Warning: Give to only trusted users and do not combine with "edit css limited"'),
),
'edit css' => array(
'title' => t('Edit and save CSS - Full Access'),
'description' => t('Edit and save any CSS with the live editor (filesystem permitting).'),
'warning' => t('Warning: Combining this with "edit css limited" negates the lesser permission.'),
),
'edit css limited' => array(
'title' => t('Edit and save CSS - Limited Access'),
'description' => t('Edit and save CSS with the live editor. Enabling this permission will result in restricted access to CSS files based on what path is enabled on the Live CSS settings page.'),
),
);
}