settings/Middleware/SubadminMiddleware.php
/**
	 * Check if sharing is enabled before the controllers is executed
	 * @param \OCP\AppFramework\Controller $controller
	 * @param string $methodName
	 * @throws \Exception
	 */
Check if sharing is enabled before the controllers is executed
@param \OCP\AppFramework\Controller $controller
@param string $methodName
@throws \Exception
Check if sharing is enabled before the controllers is executed @param \ OCP \ AppFramework \ Controller $controller @param string $methodName @throws \ Exception
public function beforeController($controller, $methodName) {
		if(!$this->reflector->hasAnnotation('NoSubadminRequired')) {
			if(!$this->isSubAdmin) {
				throw new NotAdminException('Logged in user must be a subadmin');
			}
		}
	}
public function beforeController ( $ controller , $ methodName ) { if ( ! $ this -> reflector -> hasAnnotation ( 'NoSubadminRequired' ) ) { if ( ! $ this -> isSubAdmin ) { throw new NotAdminException ( 'Logged in user must be a subadmin' ) ; } } }
Check if sharing is enabled before the controllers is executed
 @param \OCP\AppFramework\Controller $controller
 @param string $methodName
 @throws \Exception
Check if sharing is enabled before the controllers is executed @param \ OCP \ AppFramework \ Controller $controller @param string $methodName @throws \ Exception