use of io.lumeer.api.model.Collection in project engine by Lumeer.
the class CollectionFacade method deleteCollectionAttribute.
public void deleteCollectionAttribute(String collectionId, String attributeFullName) {
Collection collection = collectionDao.getCollectionById(collectionId);
permissionsChecker.checkRole(collection, Role.MANAGE);
collection.deleteAttribute(attributeFullName);
collectionDao.updateCollection(collection.getId(), collection);
}
use of io.lumeer.api.model.Collection in project engine by Lumeer.
the class CollectionFacade method updateUserPermissions.
public Set<Permission> updateUserPermissions(final String collectionId, final Permission... userPermissions) {
Collection collection = collectionDao.getCollectionById(collectionId);
permissionsChecker.checkRole(collection, Role.MANAGE);
collection.getPermissions().updateUserPermissions(userPermissions);
Collection updatedCollection = collectionDao.updateCollection(collection.getId(), collection);
return updatedCollection.getPermissions().getUserPermissions();
}
use of io.lumeer.api.model.Collection in project engine by Lumeer.
the class CollectionFacade method updateGroupPermissions.
public Set<Permission> updateGroupPermissions(final String collectionId, final Permission... groupPermissions) {
Collection collection = collectionDao.getCollectionById(collectionId);
permissionsChecker.checkRole(collection, Role.MANAGE);
collection.getPermissions().updateGroupPermissions(groupPermissions);
Collection updatedCollection = collectionDao.updateCollection(collection.getId(), collection);
return updatedCollection.getPermissions().getGroupPermissions();
}
use of io.lumeer.api.model.Collection in project engine by Lumeer.
the class CollectionFacade method removeUserPermission.
public void removeUserPermission(final String collectionId, final String user) {
Collection collection = collectionDao.getCollectionById(collectionId);
permissionsChecker.checkRole(collection, Role.MANAGE);
collection.getPermissions().removeUserPermission(user);
collectionDao.updateCollection(collection.getId(), collection);
}
use of io.lumeer.api.model.Collection in project engine by Lumeer.
the class CollectionFacade method removeGroupPermission.
public void removeGroupPermission(final String collectionId, final String group) {
Collection collection = collectionDao.getCollectionById(collectionId);
permissionsChecker.checkRole(collection, Role.MANAGE);
collection.getPermissions().removeGroupPermission(group);
collectionDao.updateCollection(collection.getId(), collection);
}
Aggregations