linagora / tmail-backend

GNU Affero General Public License v3.0
41 stars 22 forks source link

Delegation storage API: memory implementation #48

Closed Arsnael closed 1 year ago

Arsnael commented 3 years ago

Based on the work done regarding delegation in apache james, you need to add an API to manage account delegations of a user.

Thus in AccountDelegation, you could add those extra methods:

DoD: Write a memory implementation of it and its contract to show it works accordingly

chibenwa commented 3 years ago

Few remarks:

Think:

Which one would you prefer working with in WebAdmin?

In https://app.zenhub.com/workspaces/team-james-5873652b2a0b13cc0b8bbe63/issues/linagora/james-project-private/78#issuecomment-784719859 I did work on a sum up of the overall architecture, this API would look like:

trait DelegationStore {
  def listDelegatedUsers(username: Username): SFlux[Username]
  def addDelegatedUser(accessor: Username, accessee: Username): SMono[Unit]
  def removeDelegatedUser(accessor: Username, accessee: Username): SMono[Unit]
  def isDelegated(accessor: Username, accessee: Username): SMono[Boolean]
}

(Can be implemented in Java)

Question: where (which maven project) is this class located?