Skip to content

Commit

Permalink
fix(rbac): move admin creation to the admin-permissions directory
Browse files Browse the repository at this point in the history
  • Loading branch information
PatAKnight committed Oct 21, 2024
1 parent c3325e2 commit dcb9437
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import type { Source } from '@janus-idp/backstage-plugin-rbac-common';

import { resolve } from 'path';

import { ADMIN_ROLE_AUTHOR } from '../admin-permissions/admin-creation';
import { CasbinDBAdapterFactory } from '../database/casbin-adapter-factory';
import {
RoleMetadataDao,
RoleMetadataStorage,
} from '../database/role-metadata';
import { ADMIN_ROLE_AUTHOR } from '../file-permissions/admin-creation';
import { BackstageRoleManager } from '../role-manager/role-manager';
import { EnforcerDelegate } from '../service/enforcer-delegate';
import { MODEL } from '../service/permission-model';
Expand Down
2 changes: 1 addition & 1 deletion plugins/rbac-backend/src/helper.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ADMIN_ROLE_AUTHOR } from './admin-permissions/admin-creation';
import { RoleMetadataDao } from './database/role-metadata';
import { ADMIN_ROLE_AUTHOR } from './file-permissions/admin-creation';
import {
deepSortedEqual,
isPermissionAction,
Expand Down
2 changes: 1 addition & 1 deletion plugins/rbac-backend/src/service/enforcer-delegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { Knex } from 'knex';

import EventEmitter from 'events';

import { ADMIN_ROLE_NAME } from '../admin-permissions/admin-creation';
import {
RoleMetadataDao,
RoleMetadataStorage,
} from '../database/role-metadata';
import { ADMIN_ROLE_NAME } from '../file-permissions/admin-creation';
import { mergeRoleMetadata, policiesToString, policyToString } from '../helper';
import { MODEL } from './permission-model';

Expand Down
2 changes: 1 addition & 1 deletion plugins/rbac-backend/src/service/permission-policy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ import type { RoleMetadata } from '@janus-idp/backstage-plugin-rbac-common';

import { resolve } from 'path';

import { ADMIN_ROLE_NAME } from '../admin-permissions/admin-creation';
import { CasbinDBAdapterFactory } from '../database/casbin-adapter-factory';
import { ConditionalStorage } from '../database/conditional-storage';
import {
RoleMetadataDao,
RoleMetadataStorage,
} from '../database/role-metadata';
import { ADMIN_ROLE_NAME } from '../file-permissions/admin-creation';
import { BackstageRoleManager } from '../role-manager/role-manager';
import { EnforcerDelegate } from './enforcer-delegate';
import { MODEL } from './permission-model';
Expand Down
8 changes: 4 additions & 4 deletions plugins/rbac-backend/src/service/permission-policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ import {
toPermissionAction,
} from '@janus-idp/backstage-plugin-rbac-common';

import {
setAdminPermissions,
useAdminsFromConfig,
} from '../admin-permissions/admin-creation';
import {
createPermissionEvaluationOptions,
EVALUATE_PERMISSION_ACCESS_STAGE,
Expand All @@ -37,10 +41,6 @@ import {
import { replaceAliases } from '../conditional-aliases/alias-resolver';
import { ConditionalStorage } from '../database/conditional-storage';
import { RoleMetadataStorage } from '../database/role-metadata';
import {
setAdminPermissions,
useAdminsFromConfig,
} from '../file-permissions/admin-creation';
import { CSVFileWatcher } from '../file-permissions/csv-file-watcher';
import { YamlConditinalPoliciesFileWatcher } from '../file-permissions/yaml-conditional-file-watcher';
import { EnforcerDelegate } from './enforcer-delegate';
Expand Down

0 comments on commit dcb9437

Please sign in to comment.