231 |
231 |
// This because user_role_grant_permissions() will create the permission in the role_permision table if it does not
|
232 |
232 |
// exist, and for that it needs to find a module that defines the permission (there is a module column in this table).
|
233 |
233 |
$permissions = array(
|
234 |
|
// Roles same as in D5 portals.
|
235 |
234 |
'access administration menu',
|
|
235 |
'access administration pages',
|
|
236 |
'access content',
|
|
237 |
'access content overview',
|
|
238 |
'access extlinks content',
|
|
239 |
'access site in maintenance mode',
|
236 |
240 |
'administer blocks',
|
237 |
241 |
'administer cdm_dataportal',
|
238 |
|
'cdm_dataportal view notes',
|
239 |
|
// @comment WA: Devel and IMCE modules are not required modules in this profile.
|
240 |
|
// 'access devel information',
|
241 |
|
// 'access imce',
|
242 |
|
// 'administer imce',
|
243 |
|
'administer menu',
|
244 |
|
'access content',
|
245 |
242 |
'administer content types',
|
|
243 |
'administer extlinks',
|
|
244 |
'administer menu',
|
246 |
245 |
'administer nodes',
|
247 |
|
'create page content',
|
248 |
|
'edit own page content',
|
249 |
|
'view revisions',
|
250 |
|
'access administration pages',
|
251 |
246 |
'administer site configuration',
|
|
247 |
'administer themes',
|
252 |
248 |
'administer users',
|
253 |
|
|
254 |
|
// Roles as in D5 but with different name.
|
255 |
|
'edit any page content',
|
256 |
|
'edit any article content',
|
|
249 |
'bypass node access',
|
|
250 |
'cdm_dataportal view notes',
|
257 |
251 |
'create article content',
|
|
252 |
'create page content',
|
|
253 |
'create url aliases',
|
|
254 |
'delete any article content',
|
|
255 |
'delete any page content',
|
|
256 |
'delete own article content',
|
|
257 |
'delete own page content',
|
|
258 |
'delete revisions',
|
|
259 |
'edit any article content',
|
|
260 |
'edit any page content',
|
258 |
261 |
'edit own article content',
|
259 |
|
'administer themes',
|
260 |
|
|
261 |
|
// New roles for D7.
|
262 |
|
'access content overview',
|
263 |
|
'access site in maintenance mode',
|
264 |
|
'bypass node access',
|
265 |
|
'view the administration theme',
|
266 |
|
// 'use text format 3',
|
|
262 |
'edit own page content',
|
|
263 |
'flush caches',
|
|
264 |
'revert revisions',
|
|
265 |
'use text format full_html',
|
|
266 |
'view own unpublished content',
|
|
267 |
'view revisions',
|
|
268 |
'view the administration theme'
|
|
269 |
// Devel and IMCE modules are not yet required modules in this profile.
|
|
270 |
// 'access devel information',
|
|
271 |
// 'access imce',
|
|
272 |
// 'administer imce',
|
267 |
273 |
);
|
268 |
274 |
user_role_grant_permissions($admin_role->rid, $permissions);
|
269 |
275 |
|
solving #3384 (Adapt cdm admin permissions to Drupal 7)