public static function userHasPermissionForGroupAction($group, $action)
	{
		// Get user roles
		$roles = self::getGroupMemberRoles(
			\User::get('id'),
			$group->get('gidNumber')
		);

		// Check to see if any of our roles for user has permission for action
		foreach ($roles as $role)
		{
			$permissions = json_decode($role['permissions']);
			$permissions = (is_object($permissions)) ? $permissions : new \stdClass;
			if (property_exists($permissions, $action) && $permissions->$action == 1)
			{
				return true;
			}
		}
		return false;
	}
public static function userHasPermissionForGroupAction($group, $action)
	{
		// Get user roles
		$roles = self::getGroupMemberRoles(
			\User::get('id'),
			$group->get('gidNumber')
		);

		// Check to see if any of our roles for user has permission for action
		foreach ($roles as $role)
		{
			$permissions = json_decode($role['permissions']);
			$permissions = (is_object($permissions)) ? $permissions : new \stdClass;
			if (property_exists($permissions, $action) && $permissions->$action == 1)
			{
				return true;
			}
		}
		return false;
	}
public static function userHasPermissionForGroupAction ( $ group , $ action ) { // Get user roles $ roles = self :: getGroupMemberRoles ( \ User :: get ( 'id' ) , $ group -> get ( 'gidNumber' ) ) ; // Check to see if any of our roles for user has permission for action foreach ( $ roles as $ role ) { $ permissions = json_decode ( $ role [ 'permissions' ] ) ; $ permissions = ( is_object ( $ permissions ) ) ? $ permissions : new \ stdClass ; if ( property_exists ( $ permissions , $ action ) && $ permissions -> $ action == 1 ) { return true ; } } return false ; }
Check to see if user has permission to perform task

@param   object   $group   \Hubzero\User\Group
@param   string   $action  Group Action to perform
@return  boolean
Check to see if user has permission to perform task