use of net.geoprism.registry.roles.CreateListPermissionException in project geoprism-registry by terraframe.
the class ListType method enforceActorHasPermission.
public void enforceActorHasPermission(Operation op) {
if (!doesActorHaveWritePermission()) {
if (op.equals(Operation.CREATE)) {
CreateListPermissionException ex = new CreateListPermissionException();
ex.setOrganization(this.getOrganization().getDisplayLabel().getValue());
throw ex;
} else if (op.equals(Operation.WRITE)) {
UpdateListPermissionException ex = new UpdateListPermissionException();
ex.setOrganization(this.getOrganization().getDisplayLabel().getValue());
throw ex;
}
}
}
use of net.geoprism.registry.roles.CreateListPermissionException in project geoprism-registry by terraframe.
the class MasterList method enforceActorHasPermission.
public void enforceActorHasPermission(Operation op) {
if (!doesActorHaveWritePermission()) {
if (op.equals(Operation.CREATE)) {
CreateListPermissionException ex = new CreateListPermissionException();
ex.setOrganization(this.getOrganization().getDisplayLabel().getValue());
throw ex;
} else if (op.equals(Operation.WRITE)) {
UpdateListPermissionException ex = new UpdateListPermissionException();
ex.setOrganization(this.getOrganization().getDisplayLabel().getValue());
throw ex;
}
}
}
use of net.geoprism.registry.roles.CreateListPermissionException in project geoprism-registry by terraframe.
the class ListTypeService method enforceWritePermissions.
private void enforceWritePermissions(ListType listType) {
ServerGeoObjectType geoObjectType = listType.getGeoObjectType();
Organization organization = geoObjectType.getOrganization();
if (!ServiceFactory.getGeoObjectPermissionService().canWrite(organization.getCode(), geoObjectType)) {
CreateListPermissionException ex = new CreateListPermissionException();
ex.setOrganization(organization.getDisplayLabel().getValue());
throw ex;
}
}
use of net.geoprism.registry.roles.CreateListPermissionException in project geoprism-registry by terraframe.
the class ListTypeService method enforceReadPermissions.
private void enforceReadPermissions(ListType listType) {
ServerGeoObjectType geoObjectType = listType.getGeoObjectType();
Organization organization = geoObjectType.getOrganization();
if (!ServiceFactory.getGeoObjectPermissionService().canRead(organization.getCode(), geoObjectType)) {
CreateListPermissionException ex = new CreateListPermissionException();
ex.setOrganization(organization.getDisplayLabel().getValue());
throw ex;
}
}
Aggregations