Jump to content

Moderator permission on my content item


Adriano Faria

Recommended Posts

I'm not sure I already asked this so here it goes again.

There are some mod permissions that I explicitly disallow on my content item:

	/**
	 * Can pin?
	 *
	 * @param	\IPS\Member|NULL	$member	The member to check for (NULL for currently logged in member)
	 * @return	bool
	 */
	public function canPin( $member=NULL )
	{
		return FALSE;
	}

	/**
	 * Can unpin?
	 *
	 * @param	\IPS\Member|NULL	$member	The member to check for (NULL for currently logged in member)
	 * @return	bool
	 */
	public function canUnpin( $member=NULL )
	{
		return FALSE;
	}

	/**
	 * Can feature?
	 *
	 * @param	\IPS\Member|NULL	$member	The member to check for (NULL for currently logged in member)
	 * @return	bool
	 */
	public function canFeature( $member=NULL )
	{
		return FALSE;
	}

	/**
	 * Can unfeature?
	 *
	 * @param	\IPS\Member|NULL	$member	The member to check for (NULL for currently logged in member)
	 * @return	bool
	 */
	public function canUnfeature( $member=NULL )
	{
		return FALSE;
	}
	
	/**
	 * Can move?
	 *
	 * @param	\IPS\Member|NULL	$member	The member to check for (NULL for currently logged in member)
	 * @return	bool
	 */
	public function canMove( $member=NULL )
	{
		return FALSE;
	}

Still I got on moderator permissions:

wB1AQOF.png

 

This can be confusing to the admin. Shouldn't it check my content item permissions and then display only what I allow ?

Tks.

Link to comment
Share on other sites

2 hours ago, Daniel F said:

So just create an own ModeratorPermissions Extensions for your item and unset all unnecessary stuff. 

Wouldn't it be the ContentModeratorPermissions extension? can_move_ is handled on it, right? I'm not sure how to unset a permission there, as I can't return parent, etc.

I have 2 permission on ModeratorPermissions:

	public function getPermissions()
	{
		$return = array(
			'can_manage_fields'		=> 'YesNo',
			'can_manage_applications'	=> 'YesNo'
		);

		return $return;
	}

But this is for custom permissions, right?

Link to comment
Share on other sites

1 hour ago, newbie LAC said:

2. Create code hook and unset() MOVE permission

Hook where?

1 hour ago, newbie LAC said:

3. Create ContentModeratorPermissions extension and override MOVE permission

 

On 12/5/2018 at 9:29 AM, Adriano Faria said:

Wouldn't it be the ContentModeratorPermissions extension? can_move_ is handled on it, right? I'm not sure how to unset a permission there, as I can't return parent, etc.

 

Link to comment
Share on other sites

13 minutes ago, Adriano Faria said:

Hook where?

\IPS\core\extensions\core\ModeratorPermissions\ContentGenerator

 

26 minutes ago, Adriano Faria said:

Wouldn't it be the ContentModeratorPermissions extension? can_move_ is handled on it, right? I'm not sure how to unset a permission there, as I can't return parent, etc.

This extension add additional elements. You can't unset element. Only override.

Something like

unsupported.jpg.e4e22e66653df8ee94b832345e582f27.jpg

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...