Jump to content

ContentModeratorPermissions x ModeratorPermissions extension

Recommended Posts

I'm adding a new content moderator permission on my app:

	public function getPermissions( $toggles )
		$return['can_convert_rev_com'] = 'YesNo';

		return $return;

But it is creating a new tab:


Shouldn't it add my permisison to the existing CONTENT tab?

That way it won't make any difference in use ContentModeratorPermissions or ModeratorPermissions extension.


Link to comment
Share on other sites

You couldn't add ContentModeratorPermissions extension if you haven't ContentRouter extension with declared classes

ContentRouter extension will automaticaly add a tab. Just call it ItemModPermissions



$this->classes[] = 'IPS\downloads\File';

in the \applications\downloads\extensions\core\ContentRouter\Files.php




ContentModeratorPermissions will add new permission(s) to ItemModPermissions

Create new for Downloads



ModeratorPermissions will add a new tab. See Downloads (\applications\downloads\extensions\core\ModeratorPermissions\Files.php) for example.


Read also

ContentModeratorPermissions -> \IPS\application\Item::modPermission('permission', NULL, $container) -> \IPS\downloads\File::modPermission('hide', NULL, $container)

ModeratorPermissions -> \IPS\Member::loggedIn()->modPermission('permission') -> \IPS\Member::loggedIn()->modPermission('can_make_purchasable')

Link to comment
Share on other sites

I'm not sure I understand the question - sorry. Can you clarify? If you added a plugin on the existing extension, it wouldn't add a new tab (on its own at least).

The extension system allows you to define custom/unique permissions for your app. Downloads could have "Can manage revisions" this way, for instance, while still inheriting the global default permission options.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...