Skip to content

Commit

Permalink
set-json to fail on custom policies without .json
Browse files Browse the repository at this point in the history
  • Loading branch information
r-scheele committed Nov 4, 2023
1 parent 9f2fb2b commit 5d15563
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/access-perms.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ func (b accessPerms) isValidAccessPERM() bool {
}

func (b accessPerms) isValidAccessFile() bool {
return filepath.Ext(string(b)) == ".json"
res := filepath.Ext(string(b)) == ".json"
if !res {
fatalIf(errDummy().Trace(), "Invalid access file extension. Only .json files are supported.")
return false
}
return true
}

// accessPerms - access level.
Expand Down

0 comments on commit 5d15563

Please sign in to comment.