Skip to content

Provide a default user service #67

Description

@kbarbounakis

Description
@themost/data does not have an application user service in order to get users and roles. It uses default services to get user and group data e.g. context.model('User').where('name').equal('user1').getItem()
This operation is completely safe but sometimes it's better to have a single operation to get user or group data. This would be very useful for services like DataPermissionEventListener in order to reduce code.

Solution
A UserService or UserProvider should be suitable to resolve this issue.

class UserService {
     getUser(name) {
          //
     }
     getGroup(name) {
        //
     }
     ...
}

Alternatives
No

Additional context
No

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions