Package cz.metacentrum.perun.core.impl
Class PerunRolesLoader
java.lang.Object
cz.metacentrum.perun.core.impl.PerunRolesLoader
The purpose of the PerunRolesLoader is to load perun roles and other policies from the perun-roles.yml configuration
file.
Production configuration file is located in /etc/perun/perun-roles.yml Configuration file which is used during the build is located in perun-base/src/test/resources/perun-roles.yml
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionloadPerunPolicies
(List<String> roles) Load policies from the configuration file as list of PerunPoliciesLoad perun roles from the configuration file to the database.loadPerunRolesManagement
(List<String> availableRoleNames) Load role management rules from the configuration file as map with RoleManagementRules' identification as key and RoleManagementRules as value.void
setConfigurationPath
(Resource configurationPath) void
setSecondaryConfigurationPath
(Resource secondaryConfigurationPath)
-
Constructor Details
-
PerunRolesLoader
public PerunRolesLoader()
-
-
Method Details
-
getSecondaryConfigurationPath
-
loadPerunPolicies
Load policies from the configuration file as list of PerunPolicies- Parameters:
roles
- the list of role names used to check the correctness of rules- Returns:
- list of PerunPolicies
-
loadPerunRoles
Load perun roles from the configuration file to the database.- Parameters:
jdbc
- connection to database- Returns:
- up-to-date list of role names
-
loadPerunRolesManagement
Load role management rules from the configuration file as map with RoleManagementRules' identification as key and RoleManagementRules as value.- Parameters:
availableRoleNames
- available role names in perun to check the role names correctness when parsing the file- Returns:
- RoleManagementRules in a map.
-
setConfigurationPath
-
setSecondaryConfigurationPath
-