permission-common: use createCondition helper when creating conditions
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
committed by
Joe Porpeglia
parent
899d38ea68
commit
ada4446733
@@ -3,10 +3,10 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { Permission } from '@backstage/plugin-permission-common';
|
||||
import { ResourcePermission } from '@backstage/plugin-permission-common';
|
||||
|
||||
// @public
|
||||
export const jenkinsExecutePermission: Permission;
|
||||
export const jenkinsExecutePermission: ResourcePermission<'catalog-entity'>;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
|
||||
@@ -14,17 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { RESOURCE_TYPE_CATALOG_ENTITY } from '@backstage/plugin-catalog-common';
|
||||
import { Permission } from '@backstage/plugin-permission-common';
|
||||
import { createPermission } from '@backstage/plugin-permission-common';
|
||||
|
||||
/**
|
||||
* This permission is used to determine if a user is allowed to execute an action in jenkins plugin
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const jenkinsExecutePermission: Permission = {
|
||||
export const jenkinsExecutePermission = createPermission({
|
||||
name: 'jenkins.execute',
|
||||
attributes: {
|
||||
action: 'update',
|
||||
},
|
||||
resourceType: RESOURCE_TYPE_CATALOG_ENTITY,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user