IAppAccessFilter
in
Restricts which enabled apps a user can access, on top of the group restrictions configured by the administrator.
Register an implementation with \OCP\AppFramework\Bootstrap\IRegistrationContext::registerAppAccessFilter(). It is consulted by IAppManager::isEnabledForUser() and IAppManager::getEnabledAppsForUser(). Always enabled apps and apps that can not be restricted to groups (e.g. filesystem or authentication apps) are never filtered.
Tags
Attributes
- #[Implementable]
- $since: '33.0.10'
Table of Contents
Methods
- isAppAccessible() : bool
- Whether the user may access the given app.
Methods
isAppAccessible()
Whether the user may access the given app.
public
isAppAccessible(string $appId, IUser $user) : bool
Implementations must not call IAppManager::isEnabledForUser() or IAppManager::getEnabledAppsForUser(), as this would recurse.
Parameters
- $appId : string
-
app that is enabled for the user
- $user : IUser
Tags
Return values
bool —false to hide the app from the user