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:

eWrKehh.png

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.

Tks.

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

mod.thumb.jpg.298cfaca44d960accefc597f2b59cef3.jpg

Comment 

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

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

Result

mod2.thumb.jpg.418b397aa795afe0fe817d40db4fc312.jpg

 

ContentModeratorPermissions will add new permission(s) to ItemModPermissions

Create new for Downloads

Result

mod3.thumb.jpg.1f5f52c50901009492671e5287782665.jpg


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

mod4.thumb.jpg.d472ef55f28e01b42fa2faf2c58160d5.jpg

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

Archived

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

  • Recently Browsing   0 members

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