Skip to content

Commit dc923a5

Browse files
committed
exporting at least rank
1 parent 287730f commit dc923a5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/shared/src/permission-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ export const rankUserRole = (role: Role) => {
1717
}
1818
};
1919

20-
const isAtLeastRank = (atLeastRole: Role, currentRole?: Role) => {
20+
export const isAtLeastRank = (atLeastRole: Role, currentRole?: Role) => {
2121
if (!currentRole) return false;
2222
return rankUserRole(currentRole) >= rankUserRole(atLeastRole);
2323
};
2424

25-
const isAtMostRank = (atMostRole: Role, currentRole?: Role) => {
25+
export const isAtMostRank = (atMostRole: Role, currentRole?: Role) => {
2626
if (!currentRole) return true;
2727
return rankUserRole(currentRole) <= rankUserRole(atMostRole);
2828
};

0 commit comments

Comments
 (0)