Compare commits
No commits in common. "2c996a14e2ea8ad55d8d478e34279a670ea46035" and "859df0359dc31840bd7a94d51689037fdebb9b7b" have entirely different histories.
2c996a14e2
...
859df0359d
|
@ -9,7 +9,6 @@ const codes = require('./http-codes');
|
|||
|
||||
const apiAuthenticationMiddleware = require('../middleware/auth-middleware');
|
||||
const checkHl = require('../middleware/permission-check').checkHl;
|
||||
const checkMT = require('../middleware/permission-check').checkMT;
|
||||
|
||||
const offsetlimitMiddleware = require('../middleware/limitoffset-middleware-mongo');
|
||||
const filterHandlerCreator = require('../middleware/filter-handler-mongo');
|
||||
|
@ -181,7 +180,7 @@ users.route('/:id')
|
|||
});
|
||||
})
|
||||
|
||||
.delete(apiAuthenticationMiddleware, checkMT, (req, res, next) => {
|
||||
.delete(apiAuthenticationMiddleware, checkHl, (req, res, next) => {
|
||||
UserModel.findByIdAndRemove(req.params.id, (err, item) => {
|
||||
if (err) {
|
||||
err.status = codes.wrongrequest;
|
||||
|
|
|
@ -3,7 +3,7 @@ import {Rank} from '../../../models/model-interfaces';
|
|||
import {Fraction} from '../../../utils/fraction.enum';
|
||||
|
||||
@Component({
|
||||
selector: 'cc-rank-item',
|
||||
selector: 'pjm-rank-item',
|
||||
templateUrl: './rank-item.component.html',
|
||||
styleUrls: ['./rank-item.component.css', '../../../style/list-entry.css'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
(executeSearch)="filterRanks()">
|
||||
</cc-list-search>
|
||||
|
||||
<cc-rank-item *ngFor="let rank of ranks$ | async"
|
||||
<pjm-rank-item *ngFor="let rank of ranks$ | async"
|
||||
[rank]="rank"
|
||||
(rankDelete)="deleteRank(rank)"
|
||||
(rankSelected)="selectRank($event)"
|
||||
[selected]="rank._id == selectedRankId">
|
||||
</cc-rank-item>
|
||||
</pjm-rank-item>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@ import {Squad} from '../../../models/model-interfaces';
|
|||
import {Fraction} from '../../../utils/fraction.enum';
|
||||
|
||||
@Component({
|
||||
selector: 'cc-squad-item',
|
||||
selector: 'pjm-squad-item',
|
||||
templateUrl: './squad-item.component.html',
|
||||
styleUrls: ['./squad-item.component.css', '../../../style/list-entry.css'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
(executeSearch)="filterSquads()">
|
||||
</cc-list-search>
|
||||
|
||||
<cc-squad-item *ngFor="let squad of squads$ | async"
|
||||
<pjm-squad-item *ngFor="let squad of squads$ | async"
|
||||
[squad]="squad"
|
||||
(squadDelete)="deleteSquad(squad)"
|
||||
(squadSelected)="selectSquad($event)"
|
||||
[selected]="squad._id == selectedSquadId">
|
||||
</cc-squad-item>
|
||||
</pjm-squad-item>
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
<div class="col-sm-4">
|
||||
<mat-icon (click)="delete(); $event.stopPropagation()" matTooltip="{{'users.list.tooltip.delete' | translate}}"
|
||||
*ngIf="loginService.hasPermission(3)"
|
||||
class="pull-right" style="margin-top: 8px;" svgIcon="delete"></mat-icon>
|
||||
<mat-icon (click)="award(); $event.stopPropagation()" matTooltip="{{'users.list.tooltip.awards' | translate}}"
|
||||
class="icon-award pull-right" svgIcon="award"></mat-icon>
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import {ChangeDetectionStrategy, Component, EventEmitter, Input, Output} from '@angular/core';
|
||||
import {User} from '../../../models/model-interfaces';
|
||||
import {Fraction} from '../../../utils/fraction.enum';
|
||||
import {LoginService} from '../../../services/app-user-service/login-service';
|
||||
|
||||
@Component({
|
||||
selector: 'cc-user-item',
|
||||
selector: 'pjm-user-item',
|
||||
templateUrl: './user-item.component.html',
|
||||
styleUrls: ['./user-item.component.css', '../../../style/list-entry.css'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
|
@ -21,7 +20,7 @@ export class UserItemComponent {
|
|||
|
||||
readonly fraction = Fraction;
|
||||
|
||||
constructor(public loginService: LoginService) {
|
||||
constructor() {
|
||||
}
|
||||
|
||||
select() {
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
[infiniteScrollDistance]="scrollDistance"
|
||||
[infiniteScrollThrottle]="throttle"
|
||||
(scrolled)="onScrollDown()">
|
||||
<cc-user-item *ngFor="let user of users$ | async"
|
||||
<pjm-user-item *ngFor="let user of users$ | async"
|
||||
[user]="user"
|
||||
(userDelete)="deleteUser(user)"
|
||||
(userSelected)="selectUser($event)"
|
||||
(userAward)="awardUser($event)"
|
||||
[selected]="user._id == selectedUserId">
|
||||
</cc-user-item>
|
||||
</pjm-user-item>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue