-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Granular OAuth Scopes (#169)
* feat: add scope checking * fix: return array * feat: add scopes check to all controllers * feat: add scope read & write functions * style: remove useless assignments * refactor: use question methods from enum * style(helper): add default arg * perf: add scopes to auth user * fix: remove double assignment * style: rename method calls * style(helper): improve effciency * style(helper): improve user assignment * refactor: update to use new guest check method * refactor: imrpove scope check for guests * style: rename changed method names * bump shards * fix: incorrect method arguments * fix: method arguments * test: add macro to test scope on crud routes * fix: variable name * test: call scopes test in each controller * style: remove Useless assignment * chore: bump version * test: add spec for scopes for update route * test(metadata): add unique metadata spec * stlye: clean up format * refactor: add abstract def controller scope * style(current-user): add back new lines * refactor: turn can_guest_read into abstract * refactor(systems): ensure all routes are scoped * fix(systems): method name * test(systems): add start scope test * feat: add available scopes endpoint * feat: autogenerate scope checks * refactor(api:application): remove scopes code * refactor(current-user): use correct method * refactor(utils:scopes): move scopes into module - Fixed compilation issues with scopes - Seperated callbacks and scope checks in each controller - Removed a few redundant includes of `Utils::CurrentUser` * fix(utils:scopes): check access inclusion rather than equality * fix(scopes): add verbatim * fix(scopes): correct access for multiple scopes * style(scopes): ignore Ameba * fix(scopes): correct constant assignment * fix(scopes): resolve path * refactor(scopes): add macro for update spec * refactor(scopes): improve macro in spec * fix(root): lazy getter for scopes endpoint * test(root): improve scope endpoint test * refactor(scopes): ensure checks called statically * docs(scopes): add example * docs(scopes): update comment Co-authored-by: Caspian Baska <email@caspian.computer>
- Loading branch information
Showing
40 changed files
with
818 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,4 +228,3 @@ shards: | |
yaml_mapping: | ||
git: https://github.com/crystal-lang/yaml_mapping.cr.git | ||
version: 0.1.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: placeos-rest-api | ||
version: 1.29.3 | ||
version: 1.30.0 | ||
crystal: ~> 1 | ||
|
||
targets: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.