Skip to content

Commit

Permalink
Merge pull request #207 from nmaas-platform/149-handle-namespace-crea…
Browse files Browse the repository at this point in the history
…tion-during-domain-provisioning-1

update roles
  • Loading branch information
llopat authored Mar 13, 2024
2 parents 71942d7 + b5d5fdd commit bc1ec7b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {DomainGroup} from '../../../model/domaingroup';
import {Domain} from '../../../model/domain';
import {User} from '../../../model';
import {AuthService} from '../../../auth/auth.service';
import { ProfileService } from '../../../service/profile.service';

@Component({
selector: 'app-domain-group-view',
Expand Down Expand Up @@ -35,7 +36,8 @@ export class DomainGroupViewComponent extends BaseComponent implements OnInit {
private route: ActivatedRoute,
private domainService: DomainService,
private userService: UserService,
private authService: AuthService
private authService: AuthService,
private profileService: ProfileService
) {
super();
}
Expand Down Expand Up @@ -69,10 +71,14 @@ export class DomainGroupViewComponent extends BaseComponent implements OnInit {
console.log(this.domainGroup)
// creation
if (this.domainGroup.id === undefined || this.domainGroup.id === null) {
this.domainService.createDomainGroup(this.domainGroup).subscribe(data => {
console.warn('crated', data);
this.router.navigate(['/admin/domains/groups/', data.id]);
this.profileService.getOne().subscribe(owner => {
this.domainGroup.managers.push(owner)
this.domainService.createDomainGroup(this.domainGroup).subscribe(data => {
console.warn('crated', data);
this.router.navigate(['/admin/domains/groups/', data.id]);
})
})

} else {
this.domainService.updateDomainGroup(this.domainGroup, this.domainGroupId).subscribe(_ => {
if (refresh) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/navbar/navbar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<li *roles="['ROLE_SYSTEM_ADMIN']"><a
[routerLink]="['/admin/users']">{{ 'NAVBAR.USERS' | translate }}</a>
</li>
<li *roles="['ROLE_DOMAIN_ADMIN', 'ROLE_VL_MANAGER', 'ROLE_VL_DOMAIN_ADMIN']"><a
<li *roles="['ROLE_DOMAIN_ADMIN', 'ROLE_VL_DOMAIN_ADMIN']"><a
[routerLink]="['/domain/users']">{{ 'NAVBAR.DOMAIN_USERS' | translate }}</a>
</li>
<li *roles="['ROLE_SYSTEM_ADMIN']"><a
Expand Down

0 comments on commit bc1ec7b

Please sign in to comment.