e64f6f8569
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.
38 lines
1.4 KiB
Modula-2
38 lines
1.4 KiB
Modula-2
module github.com/jordanknott/taskcafe
|
|
|
|
go 1.13
|
|
|
|
require (
|
|
github.com/99designs/gqlgen v0.11.3
|
|
github.com/BurntSushi/toml v0.3.1
|
|
github.com/RichardKnop/machinery v1.8.6
|
|
github.com/boyter/scc v2.12.0+incompatible // indirect
|
|
github.com/dbaggerman/cuba v0.3.2 // indirect
|
|
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
|
github.com/go-chi/chi v3.3.2+incompatible
|
|
github.com/go-chi/cors v1.0.0
|
|
github.com/gochrono/chrono v1.1.0
|
|
github.com/golang-migrate/migrate/v4 v4.11.0
|
|
github.com/google/martian v2.1.0+incompatible
|
|
github.com/google/uuid v1.1.1
|
|
github.com/jmoiron/sqlx v1.2.0
|
|
github.com/jordan-wright/email v0.0.0-20200602115436-fd8a7622303e
|
|
github.com/kirsle/configdir v0.0.0-20170128060238-e45d2f54772f
|
|
github.com/lib/pq v1.3.0
|
|
github.com/magefile/mage v1.9.0
|
|
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect
|
|
github.com/monochromegane/go-gitignore v0.0.0-20200525100937-58356a36e03f // indirect
|
|
github.com/pelletier/go-toml v1.8.0
|
|
github.com/pkg/errors v0.9.1
|
|
github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0
|
|
github.com/sirupsen/logrus v1.4.2
|
|
github.com/spf13/cobra v1.0.0
|
|
github.com/spf13/jwalterweatherman v1.0.0
|
|
github.com/spf13/pflag v1.0.5 // indirect
|
|
github.com/spf13/viper v1.4.0
|
|
github.com/streadway/amqp v1.0.0
|
|
github.com/vektah/gqlparser/v2 v2.0.1
|
|
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073
|
|
golang.org/x/text v0.3.3 // indirect
|
|
)
|