Require auth for most methods
This commit is contained in:
@@ -81,3 +81,9 @@ func UserIDFromContext(ctx context.Context) string {
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func RoleAtLeast(ctx context.Context, role pb.User_Role) bool {
|
||||
ctxRole := RoleFromContext(ctx)
|
||||
|
||||
return ctxRole > role
|
||||
}
|
||||
|
Reference in New Issue
Block a user