-
Notifications
You must be signed in to change notification settings - Fork 0
Ba meyer master #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Ba meyer master #68
Changes from 26 commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
725a2d5
CHANGED & ADDED
b31eb63
CHANGED & ADDED
94713d0
CHANGED files
c1f1299
Added confirm dialog
efc9882
Fixed author picker
670b6c7
Merged master
559b789
Fixed merge changes
b12e9be
Deleted unused code
24cbaad
FIXED lint errors
70f2f82
FIXED karma erros
ba9d9c9
DELETED unused code and files
4c29ad8
ADDED Context enum, CHANGED files
ad60ff5
Fixed lint error
cc377a6
DELETED merge mistake
e1f51c7
ADDED features
7f08f38
MERGED master
2d1bb00
ADDED minor changes
f470aa6
CHANGE code clean up
7b509e2
CHANGE deep code suggestion
3448491
CHANGED urls
8501613
RESET routing
aed8084
Merge branch 'master' into ba-merge
f9c1993
MERGE master into ba-meyer-master
TYueksel cb64e59
Fixed bugs from MERGE master
TYueksel 2d9d1ca
Removed dead code and fixed lint error
TYueksel 21d17e1
Fixed lint errors
TYueksel 78b7b4a
Delete comment-list.component.spec.ts
TYueksel 4c28452
cleaned up the log messages
TYueksel 612a001
Merge branch 'ba-meyer-master' of https://github.com/PatternAtlas/pat…
TYueksel 8e39336
Added candidates to languages tab
TYueksel 371766f
Fix linting issues
TYueksel 3b34747
Merge branch 'master' into ba-meyer-master
TYueksel df7e8e5
fixed katex import
TYueksel c6dfddd
Added types and fixed typo
TYueksel 387c4b6
Added Priv Management UI and Admin UI bug fix
TYueksel a258c82
added feature toggle for authentication
mhinkie e9f5a40
Merge branch 'master' into ba-meyer-master
mhinkie 98b588d
Merge branch 'master' into ba-meyer-master
mhinkie a830892
fixed broken ui spacing
mhinkie c64b71c
fixed adding authors on create
mhinkie 5eecd41
linter fixes
mhinkie 438fd7a
added fix for role overview in admin panel
mhinkie e37319d
fixed adding/deleting users
mhinkie e16e6cc
user info page now shows correct role
mhinkie 0866f5e
add management tab for default author privileges
PhilWun 967dc47
add dialog to ask if the user wants to also update all resource speci…
PhilWun bf7e247
change http method to match the REST guidelines
PhilWun d9493e3
adjustment for keycloak integration + auth service bugfixes
mhinkie b5100f9
keycloak integration changes
mhinkie 407c92a
added link to user-credentials management in keycloak
mhinkie 5c24041
fixed logout bug
mhinkie 7fb4b16
removed feature toggles for planqkUI and disabled design models
mhinkie 75ce442
added missing privilege toggle for issues
mhinkie 6edeab8
added missing privilege checks for add button
mhinkie fcbff93
added privilege checks for pattern deleting ui
mhinkie 8edadb0
added privilege checks for pattern details
mhinkie c6f492a
added missing privilege check for issue-settings
mhinkie 306e7b2
removed unneeded log messages
mhinkie 0b782ed
adapted environment for docker image with authentication
mhinkie 01caf06
removed some unused code
mhinkie d6768ee
removed unused else
mhinkie 36ff17f
added union of literals instead of privilegetype
mhinkie a7fef73
removed manual change deteaction
mhinkie 82fab43
changed differentiation between update and create in user-detail
mhinkie 10191e4
removed vscode settings
mhinkie 98749a8
split and renamed keys for local storage
mhinkie 1fdd1ea
fixed random string fn
mhinkie c0e36e9
added descriptive names in privilege service
mhinkie 85e9974
added aria-label for icon buttons that do not have a descr nearby or a
mhinkie 7e56841
removed author list change det.
mhinkie ca31379
used full buffer for randoms tring generation
mhinkie 40a4a40
component styling and action changes according to pr
mhinkie ba62baf
added liter rules for banned types (i.e. String)
mhinkie 9ef983d
model changes and ui adaptions
mhinkie 499a41a
removed spaces
mhinkie bfd8976
changed to container to remove linebreak
mhinkie a52843f
fixed linter errors found by new ban-types rule
mhinkie 5770f5a
changed new services to use typed http requests
mhinkie a8dc49f
changed admin panel to allow changing roles for users without email
mhinkie b46a96a
small ui component refactoring
mhinkie c547acd
added routerlink for back button in issue-author management
mhinkie 53b1c00
removed stoppropagation
mhinkie e6fa090
comment changes and documentation
mhinkie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "editor.tabSize": 2 | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
src/app/admin-management/admin-management-detail/admin-management-detail.component.html
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
src/app/admin-management/admin-management-detail/admin-management-detail.component.scss
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
src/app/admin-management/admin-management-list/admin-management-list.component.html
This file was deleted.
Oops, something went wrong.
52 changes: 0 additions & 52 deletions
52
src/app/admin-management/admin-management-list/admin-management-list.component.ts
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/app/admin-management/privilege/privilege.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <table mat-table [dataSource]="dataSource" class="mat-elevation-z8"> | ||
|
|
||
| <ng-container matColumnDef="PRIVILEGE"> | ||
| <th mat-header-cell *matHeaderCellDef> PRIVILEGE </th> | ||
| <td mat-cell *matCellDef="let element"> {{element.name}} </td> | ||
| </ng-container> | ||
|
|
||
| <ng-container [matColumnDef]="role.name" *ngFor="let role of roles;trackBy: trackByFn"> | ||
| <th mat-header-cell *matHeaderCellDef> {{role.name}} </th> | ||
| <td mat-cell *matCellDef="let element; let i = index"> | ||
| <mat-checkbox [checked]="role.privileges.includes(element.name)" (change)="change($event, element, role)"> | ||
| </mat-checkbox> | ||
| </td> | ||
| </ng-container> | ||
|
|
||
| <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> | ||
| <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> | ||
| </table> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| table { | ||
| width: 100%; | ||
| } |
12 changes: 6 additions & 6 deletions
12
...log/issue-create-dialog.component.spec.ts → ...ent/privilege/privilege.component.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| import { Component, OnInit, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core'; | ||
| import { RoleModel, UserService, UserRole, PrivilegeModel, RoleModelRequest } from 'src/app/core/user-management'; | ||
| import { Privilege } from 'src/app/core/user-management/_models/privilege.enum'; | ||
| import { MatCheckboxChange } from '@angular/material/checkbox'; | ||
|
|
||
| @Component({ | ||
| selector: 'pp-privilege', | ||
| templateUrl: './privilege.component.html', | ||
| styleUrls: ['./privilege.component.scss'], | ||
| // changeDetection: ChangeDetectionStrategy.OnPush, | ||
| }) | ||
| export class PrivilegeComponent implements OnInit { | ||
|
|
||
| privileges: string[] = []; | ||
|
|
||
| displayedColumns: string[] = ['PRIVILEGE']; | ||
| dataSource: PrivilegeModel[] = []; | ||
| roles: RoleModel[]; | ||
|
|
||
|
|
||
| constructor( | ||
| private userService: UserService, | ||
| private ref: ChangeDetectorRef | ||
| ) { } | ||
|
|
||
| ngOnInit(): void { | ||
| this.userService.getAllPrivileges().subscribe(result => { | ||
| this.dataSource = result; | ||
| this.ref.detectChanges(); | ||
| // this.ref.markForCheck(); | ||
| }); | ||
| this.userService.getAllRoles().subscribe(result => { | ||
| this.roles = result; | ||
| this.roles.forEach(role => this.displayedColumns.push(role.name)); | ||
| this.ref.detectChanges(); | ||
| // this.ref.markForCheck(); | ||
| }); | ||
| } | ||
|
|
||
| change(checkbox: MatCheckboxChange, privilege: PrivilegeModel, role: RoleModel) { | ||
| this.userService.updateUserRole(role, privilege, new RoleModelRequest(checkbox.checked)).subscribe(result => { | ||
| if (result) { | ||
| const index = this.roles.indexOf(role); | ||
| if (index > -1) this.roles.splice(index, 1, result); | ||
| } | ||
| }) | ||
| } | ||
|
|
||
| trackByFn(index, item) { | ||
| return item.id; // or item.id | ||
| } | ||
| } |
40 changes: 40 additions & 0 deletions
40
src/app/admin-management/user/user-detail/user-detail.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| <form [formGroup]="userForm" (ngSubmit)="onSubmit()" class="container"> | ||
|
|
||
| <mat-form-field> | ||
| <input matInput placeholder="Username" formControlName="name" /> | ||
| <mat-error *ngIf="!userForm.get('name').valid">Username is required</mat-error> | ||
| <mat-hint align="start">A custom name for the user</mat-hint> | ||
| </mat-form-field> | ||
|
|
||
| <mat-form-field> | ||
| <input matInput placeholder="E-Mail" formControlName="email" /> | ||
mhinkie marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <mat-error *ngIf="!userForm.get('email').valid">E-Mail is required</mat-error> | ||
| <mat-hint align="start">e-mail address for the user to later login</mat-hint> | ||
| </mat-form-field> | ||
|
|
||
| <mat-form-field> | ||
| <input matInput placeholder="New password" formControlName="password"> | ||
mhinkie marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <mat-error *ngIf="!userForm.get('password').valid"> | ||
| Please enter your new password | ||
| </mat-error> | ||
| </mat-form-field> | ||
|
|
||
| <mat-form-field> | ||
| <input matInput placeholder="Confirm password" formControlName="confirmPassword"> | ||
| <!-- <mat-error *ngIf="userForm.hasError('notSame')"> --> | ||
| <mat-error *ngIf="!userForm.get('confirmPassword').valid"> | ||
| Passwords do not match | ||
| </mat-error> | ||
| </mat-form-field> | ||
|
|
||
| <!-- <label>Pick user role</label> --> | ||
| <mat-radio-group formControlName="userRole"> | ||
| <mat-radio-button *ngFor="let role of roles" color="primary" [value]="role">{{role}}</mat-radio-button> | ||
| </mat-radio-group> | ||
| <div class="buttons"> | ||
| <button mat-flat-button type="submit" color="primary" [disabled]="!userForm.valid">Save</button> | ||
| <button mat-flat-button type="button" color="warn" (click)="reset()">Reset</button> | ||
| <button mat-flat-button type="button" color="" (click)="exit()">Cancel</button> | ||
|
|
||
| </div> | ||
| </form> | ||
17 changes: 17 additions & 0 deletions
17
src/app/admin-management/user/user-detail/user-detail.component.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| .container { | ||
| display: flex; /* or inline-flex */ | ||
| flex-direction: column; | ||
| justify-content: center; | ||
| align-items: stretch; | ||
| } | ||
|
|
||
| .buttons { | ||
| margin-top: 16px; | ||
| display: flex; | ||
| flex-direction: row; | ||
| justify-content: flex-start; | ||
| } | ||
|
|
||
| button { | ||
| margin-right: 16px; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.