Skip to content

Commit

Permalink
Ba meyer master (#68)
Browse files Browse the repository at this point in the history
* CHANGED & ADDED

* CHANGED & ADDED

* CHANGED files

* Added confirm dialog

* Fixed author picker

* Fixed merge changes

* Deleted unused code

* FIXED lint errors

* FIXED karma erros

* DELETED unused code and files

* ADDED Context enum, CHANGED files

* Fixed lint error

* DELETED merge mistake

* ADDED features

* ADDED minor changes

* CHANGE code clean up

* CHANGE deep code suggestion

* CHANGED urls

* RESET routing

* Fixed bugs from MERGE master

* Removed dead code and fixed lint error

* Fixed lint errors

* Delete comment-list.component.spec.ts

* cleaned up the log messages

* Added candidates to languages tab

* Fix linting issues

* fixed katex import

* Added types and fixed typo

* Added Priv Management UI and Admin UI bug fix

* added feature toggle for authentication

* fixed broken ui spacing

* fixed adding authors on create

* linter fixes

* added fix for role overview in admin panel

* fixed adding/deleting users

* user info page now shows correct role

* add management tab for default author privileges

* add dialog to ask if the user wants to also update all resource specific roles and privileges

* change http method to match the REST guidelines

* adjustment for keycloak integration + auth service bugfixes

* keycloak integration changes

* added link to user-credentials management in keycloak

* fixed logout bug

* removed feature toggles for planqkUI and disabled design models

* added missing privilege toggle for issues

* added missing privilege checks for add button

* added privilege checks for pattern deleting ui

* added privilege checks for pattern details

* added missing privilege check for issue-settings
and disabled pattern-views to match planqk

* removed unneeded log messages

* adapted environment for docker image with authentication

* removed some unused code

* removed unused else

* added union of literals instead of privilegetype

* removed manual change deteaction

* changed differentiation between update and create in user-detail

* removed vscode settings

* split and renamed keys for local storage

* fixed random string fn

* added descriptive names in privilege service

* added aria-label for icon buttons that do not have a descr nearby or a
tooltip

* removed author list change det.

* used full buffer for randoms tring generation

* component styling and action changes according to pr

* added liter rules for banned types (i.e. String)

* model changes and ui adaptions

* removed spaces

* changed to container to remove linebreak

* fixed linter errors found by new ban-types rule

* changed new services to use typed http requests

* changed admin panel to allow changing roles for users without email
(this is managed in external system now)

* small ui component refactoring

* added routerlink for back button in issue-author management

* removed stoppropagation

* comment changes and documentation

Co-authored-by: Luca Meyer <[email protected]>
Co-authored-by: TYueksel <[email protected]>
Co-authored-by: TYueksel <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Philipp Wundrack <[email protected]>
  • Loading branch information
6 people authored Aug 2, 2022
1 parent 0ef1f62 commit 06ab45e
Show file tree
Hide file tree
Showing 164 changed files with 4,558 additions and 1,345 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ module.exports = {
// "extends": "tslint:recommended",

rules: {
"@typescript-eslint/ban-types": ['error'],

// https://eslint.org/docs/rules/indent
'indent': ['error', 2, {
"FunctionDeclaration": {"parameters": "first"},
Expand Down
18 changes: 0 additions & 18 deletions .vscode/launch.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

31 changes: 22 additions & 9 deletions src/app/admin-management/admin-management.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,31 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { AdminManagementListComponent } from './admin-management-list/admin-management-list.component';
import { AdminManagementDetailComponent } from './admin-management-detail/admin-management-detail.component';
import { MatRadioModule } from '@angular/material/radio';
import { MatTabsModule } from '@angular/material/tabs';
/** Component */
import { UserListComponent } from './user/user-list/user-list.component';
import { UserDetailComponent } from './user/user-detail/user-detail.component';
import { PrivilegeComponent } from './privilege/privilege.component';
import { MatCheckboxModule } from '@angular/material/checkbox';

export const ADMIN_MANAGEMENT_ROUTES = [
{
path: '',
children: [
{ path: '', component: AdminManagementListComponent },
{ path: 'edit/:id', component: AdminManagementDetailComponent },
{ path: 'create', component: AdminManagementDetailComponent }
{ path: '', component: UserListComponent },
{ path: 'edit/:id', component: UserDetailComponent },
{ path: 'create', component: UserDetailComponent }
]
}
];

@NgModule({
declarations: [
AdminManagementListComponent,
AdminManagementDetailComponent,

UserListComponent,
UserDetailComponent,
PrivilegeComponent,

],
imports: [
CommonModule,
Expand All @@ -40,11 +46,18 @@ export const ADMIN_MANAGEMENT_ROUTES = [
MatFormFieldModule,
MatInputModule,
MatButtonToggleModule,
MatRadioModule,
MatTabsModule,
MatCheckboxModule,
// Form
FormsModule,
ReactiveFormsModule
],
providers: []
providers: [
],
entryComponents: [
UserDetailComponent
]
})
export class AdminManagementModule {
}
18 changes: 18 additions & 0 deletions src/app/admin-management/privilege/privilege.component.html
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>
3 changes: 3 additions & 0 deletions src/app/admin-management/privilege/privilege.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
table {
width: 100%;
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { IssueCreateDialogComponent } from './issue-create-dialog.component';
import { PrivilegeComponent } from './privilege.component';

describe('IssueCreateDialogComponent', () => {
let component: IssueCreateDialogComponent;
let fixture: ComponentFixture<IssueCreateDialogComponent>;
describe('PrivilegeComponent', () => {
let component: PrivilegeComponent;
let fixture: ComponentFixture<PrivilegeComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [IssueCreateDialogComponent]
declarations: [ PrivilegeComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(IssueCreateDialogComponent);
fixture = TestBed.createComponent(PrivilegeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
Loading

0 comments on commit 06ab45e

Please sign in to comment.