* @package generis */ interface PermissionInterface { const SERVICE_ID = 'generis/permissions'; /** * All unsupported rigths will be mapped to this right * * @var string */ public const RIGHT_UNSUPPORTED = 'unsupported'; public const RIGHT_READ = 'READ'; public const RIGHT_WRITE = 'WRITE'; /** * Return the permissions a specified user has on the resources * specified by their ids * * This function should return an associativ array with the resourceIds * as keys an the permission arrays as values * * @param User $user * @param array $resourceIds * @return array */ public function getPermissions(User $user, array $resourceIds); /** * Hook to set initial permissions */ public function onResourceCreated(\core_kernel_classes_Resource $resource); /** * Returns a list of rights ids * * @return array */ public function getSupportedRights(); }