mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-28 06:58:54 +00:00
fix(console): partial authconfig prompt, regex permissions (#658)
* fix partial authconfig prompt, domain c perm * membership read check * contributor refresh trigger, observe org write * user permissions, project deactivate * allow user grants for project.write * fix: create project * project create, roles, grants, members * fix adminurl * disable user * disable user actions * project grant members delete, p g user grant * lint * projectgrantcreate fix Co-authored-by: Fabiennne <[email protected]>
This commit is contained in:
co-authored by
Fabiennne
parent
bd7e3731c5
commit
0dd49f7430
@@ -3,7 +3,8 @@
|
||||
<h1>{{ 'USER.PAGES.LIST' | translate }}</h1>
|
||||
<p class="sub">{{ 'USER.PAGES.DESCRIPTION' | translate }}</p>
|
||||
|
||||
<app-user-table [userType]="UserType.HUMAN"></app-user-table>
|
||||
<app-user-table [userType]="UserType.HUMAN" [disabled]="(['user.write'] | hasRole | async) == false">
|
||||
</app-user-table>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngSwitchCase="UserType.MACHINE">
|
||||
@@ -11,7 +12,8 @@
|
||||
<p class="sub">{{ 'USER.PAGES.DESCRIPTIONMACHINE' | translate }}</p>
|
||||
|
||||
<app-user-table [userType]="UserType.MACHINE"
|
||||
[displayedColumns]="['select','name', 'username', 'description','state']">
|
||||
[displayedColumns]="['select','name', 'username', 'description','state']"
|
||||
[disabled]="(['user.write'] | hasRole | async) == false">
|
||||
</app-user-table>
|
||||
</ng-container>
|
||||
</div>
|
||||
@@ -15,6 +15,7 @@ import { AvatarModule } from 'src/app/modules/avatar/avatar.module';
|
||||
import { CardModule } from 'src/app/modules/card/card.module';
|
||||
import { RefreshTableModule } from 'src/app/modules/refresh-table/refresh-table.module';
|
||||
import { SharedModule } from 'src/app/modules/shared/shared.module';
|
||||
import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe.module';
|
||||
|
||||
import { UserListRoutingModule } from './user-list-routing.module';
|
||||
import { UserListComponent } from './user-list.component';
|
||||
@@ -41,6 +42,7 @@ import { UserTableComponent } from './user-table/user-table.component';
|
||||
MatProgressSpinnerModule,
|
||||
MatCheckboxModule,
|
||||
MatTooltipModule,
|
||||
HasRolePipeModule,
|
||||
TranslateModule,
|
||||
SharedModule,
|
||||
RefreshTableModule,
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
[timestamp]="userResult?.viewTimestamp" [selection]="selection">
|
||||
<ng-template appHasRole [appHasRole]="['user.write']" actions>
|
||||
<button (click)="deactivateSelectedUsers()" matTooltip="{{'ORG_DETAIL.TABLE.DEACTIVATE' | translate}}"
|
||||
class="icon-button" mat-icon-button *ngIf="selection.hasValue()">
|
||||
class="icon-button" mat-icon-button *ngIf="selection.hasValue()" [disabled]="disabled">
|
||||
<mat-icon svgIcon="mdi_account_cancel"></mat-icon>
|
||||
</button>
|
||||
<button (click)="reactivateSelectedUsers()" matTooltip="{{'ORG_DETAIL.TABLE.ACTIVATE' | translate}}"
|
||||
class="icon-button" mat-icon-button *ngIf="selection.hasValue()">
|
||||
class="icon-button" mat-icon-button *ngIf="selection.hasValue()" [disabled]="disabled">
|
||||
<mat-icon svgIcon="mdi_account_check_outline"></mat-icon>
|
||||
</button>
|
||||
<a class="add-button" [routerLink]="[ '/users',userType == UserType.HUMAN ? 'create' : 'create-machine']"
|
||||
color="primary" mat-raised-button>
|
||||
color="primary" mat-raised-button [disabled]="disabled">
|
||||
<mat-icon class="icon">add</mat-icon>{{ 'ACTIONS.NEW' | translate }}
|
||||
</a>
|
||||
</ng-template>
|
||||
|
||||
@@ -5,7 +5,7 @@ import { MatTableDataSource } from '@angular/material/table';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { UserView } from 'src/app/proto/generated/auth_pb';
|
||||
import { UserSearchKey, UserSearchQuery, UserSearchResponse } from 'src/app/proto/generated/management_pb';
|
||||
import { SearchMethod, UserSearchKey, UserSearchQuery, UserSearchResponse } from 'src/app/proto/generated/management_pb';
|
||||
import { ManagementService } from 'src/app/services/mgmt.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@@ -19,6 +19,7 @@ import { UserType } from '../user-list.component';
|
||||
export class UserTableComponent implements OnInit {
|
||||
public UserType: any = UserType;
|
||||
@Input() userType: UserType = UserType.HUMAN;
|
||||
@Input() disabled: boolean = false;
|
||||
@ViewChild(MatPaginator) public paginator!: MatPaginator;
|
||||
public dataSource: MatTableDataSource<UserView.AsObject> = new MatTableDataSource<UserView.AsObject>();
|
||||
public selection: SelectionModel<UserView.AsObject> = new SelectionModel<UserView.AsObject>(true, []);
|
||||
@@ -79,9 +80,11 @@ export class UserTableComponent implements OnInit {
|
||||
this.loadingSubject.next(true);
|
||||
const query = new UserSearchQuery();
|
||||
query.setKey(UserSearchKey.USERSEARCHKEY_TYPE);
|
||||
query.setMethod(SearchMethod.SEARCHMETHOD_EQUALS);
|
||||
query.setValue(filterTypeValue);
|
||||
console.log(filterTypeValue);
|
||||
|
||||
this.userService.SearchUsers(limit, offset).then(resp => {
|
||||
this.userService.SearchUsers(limit, offset, [query]).then(resp => {
|
||||
this.userResult = resp.toObject();
|
||||
this.dataSource.data = this.userResult.resultList;
|
||||
console.log(this.userResult.resultList);
|
||||
|
||||
Reference in New Issue
Block a user