Commit Graph

7 Commits

Author SHA1 Message Date
Jordan Knott
46e724e731 feat: add pre commit hook to lint frontend & fix warnings 2020-08-23 17:29:06 -05:00
Jordan Knott
2e9767f1a0 chore: remove debug console.log statements 2020-08-12 14:44:28 -05:00
Jordan Knott
6761d4571e feat: add change password tab to user profile settings 2020-08-12 14:09:12 -05:00
Jordan Knott
e64f6f8569 feat: enforce user roles
enforces user admin role requirement for
- creating / deleting / setting role for organization users
- creating / deleting / setting role for project users
- updating project name
- deleting project

hides action elements based on role for
- admin console
- team settings if team is only visible through project membership
- add project tile if not team admin
- project name text editor if not team / project admin
- add redirect from team page if settings only visible through project
  membership
- add redirect from admin console if not org admin

role enforcement is handled on the api side through a custom GraphQL
directive `hasRole`. on the client side, role information is fetched in
the TopNavbar's `me` query and stored in the `UserContext`.

there is a custom hook, `useCurrentUser`, that provides a user object
with two functions, `isVisibile` & `isAdmin` which is used to check
roles in order to render/hide relevant UI elements.
2020-08-11 21:03:21 -05:00
Jordan Knott
5dbdc20b36 chore: rename Citadel to Taskcafe 2020-08-06 20:50:35 -05:00
Jordan Knott
70802ff4c9 fix: replace hardcoded API url's with absolute paths
fixes issue #10
2020-07-20 17:37:31 -05:00
Jordan Knott
e5d5e6da01 arch: move web folder into api & move api to top level 2020-07-04 18:08:37 -05:00