mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-08 08:31:37 +00:00
parent
be4863a320
commit
2582ec60f2
@ -268,6 +268,10 @@ public final class CatalogExceptionMessage {
|
|||||||
return String.format("System entity [%s] of type %s can not be renamed.", name, entityType);
|
return String.format("System entity [%s] of type %s can not be renamed.", name, entityType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String systemEntityModifyNotAllowed(String name, String entityType) {
|
||||||
|
return String.format("System entity [%s] of type %s can not be modified.", name, entityType);
|
||||||
|
}
|
||||||
|
|
||||||
public static String mutuallyExclusiveLabels(TagLabel tag1, TagLabel tag2) {
|
public static String mutuallyExclusiveLabels(TagLabel tag1, TagLabel tag2) {
|
||||||
return String.format(
|
return String.format(
|
||||||
"Tag labels %s and %s are mutually exclusive and can't be assigned together",
|
"Tag labels %s and %s are mutually exclusive and can't be assigned together",
|
||||||
|
@ -597,6 +597,10 @@ public class AppResource extends EntityResource<App, AppRepository> {
|
|||||||
JsonPatch patch)
|
JsonPatch patch)
|
||||||
throws SchedulerException {
|
throws SchedulerException {
|
||||||
App app = repository.get(null, id, repository.getFields("bot,pipelines"));
|
App app = repository.get(null, id, repository.getFields("bot,pipelines"));
|
||||||
|
if (app.getSystemApp()) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
CatalogExceptionMessage.systemEntityModifyNotAllowed(app.getName(), "SystemApp"));
|
||||||
|
}
|
||||||
AppScheduler.getInstance().deleteScheduledApplication(app);
|
AppScheduler.getInstance().deleteScheduledApplication(app);
|
||||||
Response response = patchInternal(uriInfo, securityContext, id, patch);
|
Response response = patchInternal(uriInfo, securityContext, id, patch);
|
||||||
App updatedApp = (App) response.getEntity();
|
App updatedApp = (App) response.getEntity();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user