using System.Collections.Immutable; using Connected.Security; using Connected.Security.Identity; using Connected.ServiceModel; using Connected.Services; using Connected.Services.Annotations; namespace Common.Security.Identity; internal class UserService : EntityService, IUserService { public UserService(IContext context) : base(context) { } [ServiceAuthorization(SecurityClaims.SecurityDelete)] public async Task Delete(PrimaryKeyArgs args) { await Invoke(GetOperation(), args); } [ServiceAuthorization(SecurityClaims.SecurityAdd)] public async Task Insert(UserInsertArgs args) { return await Invoke(GetOperation(), args); } [ServiceAuthorization(SecurityClaims.SecurityRead)] public async Task?> Query() { return await Invoke(GetOperation(), Dto.Empty); } [ServiceAuthorization(SecurityClaims.SecurityRead)] public async Task?> Query(PrimaryKeyListArgs args) { return await Invoke(GetOperation(), args); } [ServiceAuthorization(SecurityClaims.SecurityRead)] public async Task Resolve(UserResolveArgs args) { return await Invoke(GetOperation(), args); } [ServiceAuthorization(SecurityClaims.SecurityRead)] public async Task Select(PrimaryKeyArgs args) { return await Invoke(GetOperation(), args); } [ServiceAuthorization(SecurityClaims.SecurityModify, SecurityClaims.SecurityModifySelf)] public async Task Update(UserUpdateArgs args) { await Invoke(GetOperation(), args); } [ServiceAuthorization(SecurityClaims.SecurityModify, SecurityClaims.SecurityModifySelf)] public async Task UpdatePassword(UserPasswordArgs args) { await Invoke(GetOperation(), args); } }