Skip to content

Commit

Permalink
Revert "fix: make grantedUsers optional in IPage interface and handle…
Browse files Browse the repository at this point in the history
… potential null in page route"

This reverts commit a92911c.
  • Loading branch information
miya committed Jan 8, 2025
1 parent 903e5c6 commit d43bb39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/app/src/server/routes/apiv3/page/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ module.exports = (crowi) => {
} = page;
let isGrantNormalized = false;
try {
const grantedUsersId = grantedUsers?.map(ref => getIdForRef(ref));
const grantedUsersId = grantedUsers.map(ref => getIdForRef(ref));
isGrantNormalized = await pageGrantService.isGrantNormalized(req.user, path, grant, grantedUsersId, grantedGroups, false, false);
}
catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/interfaces/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type IPage = {
descendantCount: number,
isEmpty: boolean,
grant: PageGrant,
grantedUsers?: Ref<IUser>[],
grantedUsers: Ref<IUser>[],
grantedGroups: IGrantedGroup[],
lastUpdateUser?: Ref<IUser>,
liker: Ref<IUser>[],
Expand Down

0 comments on commit d43bb39

Please sign in to comment.