catalog-common: remove resourceType from catalogEntityCreatePermission

The resourceType on permissions refers to the resource whose ref is
expected to be passed along with the permission during authorization.
This allows the permission-backend to make the decision based on
characteristics of the resource.

Since the entity being created by definition doesn't yet exist, it's
not correct for this permission to include a resourceType.

Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
Mike Lewis
2022-03-01 13:35:41 +00:00
parent 5d342c7169
commit e3c2bfef11
2 changed files with 5 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-common': minor
---
Remove resourceType property from catalogEntityCreatePermission. Resource type refers to the type of resources whose resourceRefs should be passed along with authorize requests, to allow conditional responses for that resource type. Since creation does not correspond to an entity (as the entity does not exist at the time of authorization), the resourceRef should not be included on the permission.
@@ -49,7 +49,6 @@ export const catalogEntityCreatePermission: Permission = {
attributes: {
action: 'create',
},
resourceType: RESOURCE_TYPE_CATALOG_ENTITY,
};
/**