eventBus.register(this);
}
@Override
public Configuration doGetConfiguration() {
Configuration configuration = new Configuration();
configuration.addPrivilege(buildPrivilege("All Repositories - (view)",
"Privilege that gives view access to all repositories.", "*"));
for (Repository repo : repoRegistry.getRepositories()) {
configuration.addPrivilege(buildPrivilege(repo.getName() + " - (view)",
"Privilege that gives view access to the " + repo.getName()
+ " repository.", repo.getId()));
}
Set<Entry<String, ContentClass>> contents = repoTypeRegistry.getContentClasses().entrySet();
for (Entry<String, ContentClass> entry : contents) {
// TODO in the future we can create CRUD privs / roles here
configuration.addRole(buildRole(entry, "view"));
}
setDirty(false);
return configuration;