Search in sources :

Example 1 with UserRolePermissionsKey

use of de.metas.security.UserRolePermissionsKey in project metasfresh-webui-api by metasfresh.

the class MenuRestController method getMenuTree.

private MenuTree getMenuTree() {
    final UserRolePermissionsKey userRolePermissionsKey = userSession.getUserRolePermissionsKey();
    final String adLanguage = userSession.getAD_Language();
    return menuTreeRepository.getMenuTree(userRolePermissionsKey, adLanguage);
}
Also used : UserRolePermissionsKey(de.metas.security.UserRolePermissionsKey)

Example 2 with UserRolePermissionsKey

use of de.metas.security.UserRolePermissionsKey in project metasfresh-webui-api by metasfresh.

the class MenuTreeLoader method getUserRolePermissions.

private IUserRolePermissions getUserRolePermissions() {
    if (_userRolePermissions == null) {
        final UserRolePermissionsKey userRolePermissionsKey = getUserRolePermissionsKey();
        _userRolePermissions = userRolePermissionsDAO.getUserRolePermissions(userRolePermissionsKey);
    }
    return _userRolePermissions;
}
Also used : UserRolePermissionsKey(de.metas.security.UserRolePermissionsKey)

Example 3 with UserRolePermissionsKey

use of de.metas.security.UserRolePermissionsKey in project metasfresh-webui-api by metasfresh.

the class MenuTreeRepository method getUserSessionMenuTree.

public MenuTree getUserSessionMenuTree() {
    final UserRolePermissionsKey userRolePermissionsKey = userSession.getUserRolePermissionsKey();
    final String adLanguage = userSession.getAD_Language();
    return getMenuTree(userRolePermissionsKey, adLanguage);
}
Also used : UserRolePermissionsKey(de.metas.security.UserRolePermissionsKey)

Example 4 with UserRolePermissionsKey

use of de.metas.security.UserRolePermissionsKey in project metasfresh-webui-api by metasfresh.

the class SqlViewRowIdsOrderedSelectionFactory method extractQueryLimit.

private int extractQueryLimit(final ViewEvaluationCtx viewEvalCtx) {
    final UserRolePermissionsKey permissionsKey = viewEvalCtx.getPermissionsKey();
    final IUserRolePermissions permissions = userRolePermissionsRepo.getUserRolePermissions(permissionsKey);
    return permissions.getConstraint(WindowMaxQueryRecordsConstraint.class).or(WindowMaxQueryRecordsConstraint.DEFAULT).getMaxQueryRecordsPerRole();
}
Also used : UserRolePermissionsKey(de.metas.security.UserRolePermissionsKey) IUserRolePermissions(de.metas.security.IUserRolePermissions)

Aggregations

UserRolePermissionsKey (de.metas.security.UserRolePermissionsKey)4 IUserRolePermissions (de.metas.security.IUserRolePermissions)1