File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 809
809
'representation (dissoc resource ::http/body ::http/content )
810
810
'environment {}}
811
811
812
+ user-id (:juxt.pass.alpha/user subject)
813
+
814
+ roles (crux/q db '{:find [role]
815
+ :where [[role-mapping :juxt.site.alpha/type " UserRoleMapping" ]
816
+ [role-mapping :juxt.pass.alpha/assignee user-id]
817
+ [role-mapping :juxt.pass.alpha/role role]]
818
+ :in [user-id]}
819
+ user-id)
820
+
812
821
authz (when (not= method :options )
813
822
(pdp/authorization db request-context))
814
823
815
824
req (cond-> req
816
825
true (assoc ::pass/request-context request-context)
817
826
authz (assoc ::pass/authorization authz)
827
+ roles (assoc ::pass/roles roles)
818
828
; ; If the max-content-length has been modified, update that in the
819
829
; ; resource
820
830
(::http/max-content-length authz)
You can’t perform that action at this time.
0 commit comments