1
0
Fork 0
mirror of synced 2024-07-29 01:56:15 +12:00

Exporting some functions that were previously exported.

This commit is contained in:
mike12345567 2022-11-08 18:35:21 +00:00
parent 693d6b6242
commit eb251fb48e

View file

@ -373,7 +373,7 @@ export class AccessController {
/** /**
* Adds the "role_" for builtin role IDs which are to be written to the DB (for permissions). * Adds the "role_" for builtin role IDs which are to be written to the DB (for permissions).
*/ */
function getDBRoleID(roleId?: string) { export function getDBRoleID(roleId?: string) {
if (roleId?.startsWith(DocumentType.ROLE)) { if (roleId?.startsWith(DocumentType.ROLE)) {
return roleId return roleId
} }
@ -383,7 +383,7 @@ function getDBRoleID(roleId?: string) {
/** /**
* Remove the "role_" from builtin role IDs that have been written to the DB (for permissions). * Remove the "role_" from builtin role IDs that have been written to the DB (for permissions).
*/ */
function getExternalRoleID(roleId?: string) { export function getExternalRoleID(roleId?: string) {
// for built-in roles we want to remove the DB role ID element (role_) // for built-in roles we want to remove the DB role ID element (role_)
if (roleId?.startsWith(DocumentType.ROLE) && isBuiltin(roleId)) { if (roleId?.startsWith(DocumentType.ROLE) && isBuiltin(roleId)) {
return roleId.split(`${DocumentType.ROLE}${SEPARATOR}`)[1] return roleId.split(`${DocumentType.ROLE}${SEPARATOR}`)[1]