Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let getRoles =
- makeRolesQuery
- >> retrieveMultipleEntities
- >> Seq.map (fun x -> RetrieveRolePrivilegesRoleRequest (RoleId = x.Id))
- >> Seq.cast<OrganizationRequest>
- >> makeTransactionRequest
- >> executeTransactionPaged 100
- >> Seq.collect (fun x -> x.Responses)
- >> Seq.cast<RetrieveRolePrivilegesRoleResponse>
- >> Seq.collect (fun x -> x.RolePrivileges)
- >> Seq.groupBy (fun x -> x.PrivilegeId)
- >> Seq.map (fun (_, x) ->
- x
- |> Seq.sortByDescending (fun y ->
- LanguagePrimitives.EnumToValue y.Depth)
- |> Seq.head)
- >> fun x ->
- let privileges =
- x
- |> Seq.map (fun y -> y.PrivilegeId)
- |> makePrivilegesRequest
- |> retrieveMultipleEntities
- x
- |> Seq.map (fun y ->
- let name =
- privileges
- |> Seq.find (fun z ->
- z.Id = y.PrivilegeId)
- |> getAttributeValue<string> "name"
- name, y.Depth)
- >> Seq.sortBy fst
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement