Пример #1
0
                public ChannelBuilder AllowPermissionForRole(int roleNumber, string permission)
                {
                    var role = _group.Role(roleNumber);

                    _builder.AddBuildAction(async() =>
                                            await _groupsModuleFacade.SendAsync(new AllowPermissionForRoleCommand(_builder._userIdContext,
                                                                                                                  _group.GroupId, _channel.ChannelId, role.RoleId, permission)));
                    return(this);
                }
Пример #2
0
 public RoleBuilder AddPermission(string name)
 {
     _builder.AddBuildAction(async() =>
                             await _groupsModuleFacade.AddPermission(_builder._userIdContext, _group.GroupId, _role.RoleId,
                                                                     name));
     return(this);
 }
Пример #3
0
                public MemberBuilder AssignRole(int roleNumber)
                {
                    var role = _group.Role(roleNumber);

                    _builder.AddBuildAction(async() => await _facade.AssignRole(_builder._userIdContext,
                                                                                _group.GroupId, _memberContext.UserId, role.RoleId));
                    return(this);
                }