Liking cljdoc? Tell your friends :D

kaleidoscope.clj.api.groups


add-users-to-group!clj

(add-users-to-group! database requester-id group-id users)

This functionality makes a strong assumption: that users are uniquely identified by their email addresses.

We do this in order to simplify the system: by adding email addresses to the group, we don't have to worry about the problem of 'What is this users' unique ID in Keycloak?

This functionality makes a strong assumption: that users are uniquely identified
by their email addresses.

We do this in order to simplify the system: by adding email addresses to the
group, we don't have to worry about the problem of 'What is this users' unique
ID in Keycloak?
sourceraw docstring

create-group!clj

(create-group! database {:keys [id] :as group})
source

delete-group!clj

(delete-group! database requester-id group-id)

Only allow a user to delete a group if they are the owner. The user-id is the identity of the user requesting the operation.

Only allow a user to delete a group if they are the owner.
The `user-id` is the identity of the user requesting the operation.
sourceraw docstring

get-idclj

(get-id group)
source

get-ownerclj

(get-owner group)
source

get-users-groupsclj

(get-users-groups database requester-id)

Only return the groups owned by the requesting user

Only return the groups owned by the requesting user
sourceraw docstring

group-keyclj

(group-key full-membership)
source

normalize-membershipsclj

(normalize-memberships group-memberships)

Group memberships are denormalized - normalize them in Clojure so we have a nested data structure of the form: {:group-id "123" ... :other-group-information "stuff" ... :memberships [{:email string? :alias string? :membership-id string? :membership-created-at inst?}]}

Group memberships are denormalized - normalize them in Clojure so we have a
nested data structure of the form:
{:group-id                "123"
 ...
 :other-group-information "stuff"
 ...
 :memberships [{:email                 string?
                :alias                 string?
                :membership-id         string?
                :membership-created-at inst?}]}
sourceraw docstring

owns?clj

(owns? database requester-id group-id)
source

remove-user-from-group!clj

(remove-user-from-group! database
                         requester-id
                         group-id
                         user-group-membership-id)
source

select-membership-keysclj

(select-membership-keys membership)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close