Skip to content

Commit a85708f

Browse files
committed
refactor: light refactoring
1 parent 6e3920a commit a85708f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/utils.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,7 @@ function rewriteAuthIfMatches(
160160
permissionLevel: PermissionLevel,
161161
newPermission: Name
162162
): PermissionLevelType {
163-
if (permissionLevel.equals(auth)) {
164-
return PermissionLevel.from({
165-
actor: permissionLevel.actor,
166-
permission: newPermission,
167-
})
168-
}
169-
// Also rewrite PlaceholderAuth to use the session's actor with the new permission
170-
if (PlaceholderAuth.equals(auth)) {
163+
if (permissionLevel.equals(auth) || PlaceholderAuth.equals(auth)) {
171164
return PermissionLevel.from({
172165
actor: permissionLevel.actor,
173166
permission: newPermission,

0 commit comments

Comments
 (0)