Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Role Based Access Control #119

Open
wants to merge 30 commits into
base: rbac
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c21726a
feat(routes): add access specifiers
YashKumarVerma Jun 27, 2021
ca7c393
sve
YashKumarVerma Jun 30, 2021
182268f
save
YashKumarVerma Jul 6, 2021
372a915
chore : add eslint, prettier
YashKumarVerma Jul 6, 2021
4f51afa
chore(ci): run eslint and save
YashKumarVerma Jul 6, 2021
8949a92
chore(ci): update prettier configs
YashKumarVerma Jul 6, 2021
52d10aa
feat(keys): add security check fx, docs
YashKumarVerma Jul 6, 2021
850d988
chore(git): update prettier config
YashKumarVerma Jul 7, 2021
7345e01
feat(user-fx) : add default role
YashKumarVerma Jul 7, 2021
86f89ab
chore(permissionHandler): depreciated handler
YashKumarVerma Jul 7, 2021
36f1734
feat(authHandler): set default role
YashKumarVerma Jul 7, 2021
495a14b
chore(permissionHandler): update tests for handler
YashKumarVerma Jul 7, 2021
520775b
refactor(caracal): fix lints, improve codebase
YashKumarVerma Jul 7, 2021
eca4141
chore(eslint): allow console.log
YashKumarVerma Jul 7, 2021
3510ea3
chore(routes): remote permissionHandler references
YashKumarVerma Jul 8, 2021
e6bc284
feat(roles): middleware+configs
YashKumarVerma Jul 8, 2021
61d34ee
feat(roles): add definitions
YashKumarVerma Jul 11, 2021
db37a25
feat(service): add middleware
YashKumarVerma Jul 12, 2021
1589fec
feat(roles): change name for better context
YashKumarVerma Jul 12, 2021
199781b
chore(routes): tentative routes
YashKumarVerma Jul 29, 2021
dec5002
chore(docs): notes
YashKumarVerma Jul 29, 2021
5bfec22
feat(roles): load instance dynamically
YashKumarVerma Aug 15, 2021
7ced6fa
feat(roles): hardcode default roles
YashKumarVerma Aug 15, 2021
4d9c1f7
feat(app): load roles during app init
YashKumarVerma Aug 15, 2021
514ba59
chore(roles): enable context based logging
YashKumarVerma Aug 15, 2021
3c66c90
feat(roles): get latest instance on every call
YashKumarVerma Aug 15, 2021
fc6c44e
feat(roles): api to update access control rules
YashKumarVerma Aug 15, 2021
30d6387
fix(roles): loggging order
YashKumarVerma Aug 15, 2021
ba53028
test(roles): definitions
YashKumarVerma Aug 15, 2021
ac697ba
test(roles): unit tests for service components
YashKumarVerma Aug 16, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

30 changes: 0 additions & 30 deletions .eslintrc.js

This file was deleted.

14 changes: 14 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"env": {
"commonjs": true,
"es2021": true,
"node": true
},
"extends": ["airbnb-base"],
"parserOptions": {
"ecmaVersion": 12
},
"rules": {
"no-console": "off"
}
}
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"arrowParens": "always",
"singleQuote": true,
"trailingComma": "all"
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /src
RUN npm install
ARG viewer
ARG fork
RUN git clone https://github.com/${fork:-camicroscope}/camicroscope.git --branch=${viewer:-master}
#RUN git clone https://github.com/${fork:-camicroscope}/camicroscope.git --branch=${viewer:-master}
EXPOSE 8010

RUN chgrp -R 0 /src && \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The CSP headers are generated from `contentSecurityPolicy.json`.
## User property variables
These are set in userFunction and injected into the token.

userType -- Null, Editor, Admin as userTypes (e.g. Admin can create users, Editor can create marks, Null can't create anything except logs)
userType -- Null, Editor, Admin as user roles (e.g. Admin can create users, Editor can create marks, Null can't create anything except logs). The roles are hierarchical, i.e. a higher role has all rights that the roles of its juniors.

userFilter -- list of values which must be present in given field in filtered data responses

Expand Down
Loading