Documentation ¶
Index ¶
- type Scope
- func (s Scope) Add(ctx domain.RequestContext, u user.User) (err error)
- func (s Scope) CountActiveUsers() (c int)
- func (s Scope) DeactiveUser(ctx domain.RequestContext, userID string) (err error)
- func (s Scope) ForgotUserPassword(ctx domain.RequestContext, email, token string) (err error)
- func (s Scope) Get(ctx domain.RequestContext, id string) (u user.User, err error)
- func (s Scope) GetActiveUsersForOrganization(ctx domain.RequestContext) (u []user.User, err error)
- func (s Scope) GetByDomain(ctx domain.RequestContext, domain, email string) (u user.User, err error)
- func (s Scope) GetByEmail(ctx domain.RequestContext, email string) (u user.User, err error)
- func (s Scope) GetBySerial(ctx domain.RequestContext, serial string) (u user.User, err error)
- func (s Scope) GetByToken(ctx domain.RequestContext, token string) (u user.User, err error)
- func (s Scope) GetSpaceUsers(ctx domain.RequestContext, spaceID string) (u []user.User, err error)
- func (s Scope) GetUsersForOrganization(ctx domain.RequestContext, filter string) (u []user.User, err error)
- func (s Scope) GetUsersForSpaces(ctx domain.RequestContext, spaces []string) (u []user.User, err error)
- func (s Scope) MatchUsers(ctx domain.RequestContext, text string, maxMatches int) (u []user.User, err error)
- func (s Scope) UpdateUser(ctx domain.RequestContext, u user.User) (err error)
- func (s Scope) UpdateUserPassword(ctx domain.RequestContext, userID, salt, password string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scope ¶
Scope provides data access to MySQL.
func (Scope) CountActiveUsers ¶
CountActiveUsers returns the number of active users in the system.
func (Scope) DeactiveUser ¶
func (s Scope) DeactiveUser(ctx domain.RequestContext, userID string) (err error)
DeactiveUser deletes the account record for the given userID and persister.Context.OrgID.
func (Scope) ForgotUserPassword ¶
func (s Scope) ForgotUserPassword(ctx domain.RequestContext, email, token string) (err error)
ForgotUserPassword sets the password to ” and the reset field to token, for a user identified by email.
func (Scope) GetActiveUsersForOrganization ¶
GetActiveUsersForOrganization returns a slice containing of active user records for the organization identified in the Persister.
func (Scope) GetByDomain ¶
func (s Scope) GetByDomain(ctx domain.RequestContext, domain, email string) (u user.User, err error)
GetByDomain matches user by email and domain.
func (Scope) GetByEmail ¶
GetByEmail returns a single row match on email.
func (Scope) GetBySerial ¶
GetBySerial is used to retrieve a user via their temporary password salt value! This occurs when we you share a folder with a new user and they have to complete the onboarding process.
func (Scope) GetByToken ¶
GetByToken returns a user record given a reset token value.
func (Scope) GetSpaceUsers ¶
GetSpaceUsers returns a slice containing all user records for given space.
func (Scope) GetUsersForOrganization ¶
func (s Scope) GetUsersForOrganization(ctx domain.RequestContext, filter string) (u []user.User, err error)
GetUsersForOrganization returns a slice containing all of the user records for the organizaiton identified in the Persister.
func (Scope) GetUsersForSpaces ¶ added in v1.54.0
func (s Scope) GetUsersForSpaces(ctx domain.RequestContext, spaces []string) (u []user.User, err error)
GetUsersForSpaces returns users with access to specified spaces.
func (Scope) MatchUsers ¶ added in v1.58.0
func (s Scope) MatchUsers(ctx domain.RequestContext, text string, maxMatches int) (u []user.User, err error)
MatchUsers returns users that have match to either firstname, lastname or email.
func (Scope) UpdateUser ¶
UpdateUser updates the user table using the given replacement user record.
func (Scope) UpdateUserPassword ¶
func (s Scope) UpdateUserPassword(ctx domain.RequestContext, userID, salt, password string) (err error)
UpdateUserPassword updates a user record with new password and salt values.