Skip to content

Commit

Permalink
Revert "only use the site rule if there is no group rule"
Browse files Browse the repository at this point in the history
This reverts commit 2db6d15. Turns out it didn't work.
  • Loading branch information
jdub233 committed Nov 9, 2023
1 parent 2db6d15 commit 2757bc8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/authorizeRequest/authorizeRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ async function authorizeRequest(userRequest, siteRule) {
let isRootSite = indexOfRestricted ? indexOfRestricted < 5 : false;

// If there is a whole-site protection rule, the group name will be the value of the rule.
// Unless there is also a groupName from the file path, then groupName takes precedence.
if (siteRule && !groupName) {
if (siteRule) {
groupName = Object.values(siteRule)[0];
// If there's nothing after the domain, then this is a root site.
isRootSite = Object.keys(siteRule)[0] === domain;
Expand Down

0 comments on commit 2757bc8

Please sign in to comment.