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);
}
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;
}
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);
}
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();
}
Aggregations