mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
UPDATE: explicitly provide permissions for comment administration
This commit is contained in:
parent
aaec312fd5
commit
bba7a84bd1
@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* @package comments
|
* @package comments
|
||||||
*/
|
*/
|
||||||
class CommentAdmin extends LeftAndMain {
|
class CommentAdmin extends LeftAndMain implements PermissionProvider {
|
||||||
|
|
||||||
private static $url_segment = 'comments';
|
private static $url_segment = 'comments';
|
||||||
|
|
||||||
@ -24,6 +24,15 @@ class CommentAdmin extends LeftAndMain {
|
|||||||
'unmoderated'
|
'unmoderated'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public function providePermissions() {
|
||||||
|
return array(
|
||||||
|
"CMS_ACCESS_CommentAdmin" => array(
|
||||||
|
'name' => _t('CommentAdmin.ADMIN_PERMISSION', "Access to 'Comments' section"),
|
||||||
|
'category' => _t('Permission.CMS_ACCESS_CATEGORY', 'CMS Access')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Form
|
* @return Form
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,7 @@ en:
|
|||||||
Moderated: Moderated
|
Moderated: Moderated
|
||||||
NeedsModeration: 'Needs Moderation'
|
NeedsModeration: 'Needs Moderation'
|
||||||
MENUTITLE: Comments
|
MENUTITLE: Comments
|
||||||
|
ADMIN_PERMISSION: "Access to 'Comments' section"
|
||||||
CommentInterface:
|
CommentInterface:
|
||||||
POST: Post
|
POST: Post
|
||||||
YOURNAME: 'Your name'
|
YOURNAME: 'Your name'
|
||||||
|
Loading…
Reference in New Issue
Block a user