diff --git a/src/app/organizations/manage/manage.component.ts b/src/app/organizations/manage/manage.component.ts
index 730d0b44f2..51da6646f5 100644
--- a/src/app/organizations/manage/manage.component.ts
+++ b/src/app/organizations/manage/manage.component.ts
@@ -6,11 +6,14 @@ import { ActivatedRoute } from '@angular/router';
import { UserService } from 'jslib/abstractions/user.service';
+import { Organization } from 'jslib/models/domain/organization';
+
@Component({
selector: 'app-org-manage',
templateUrl: 'manage.component.html',
})
export class ManageComponent implements OnInit {
+ organization: Organization;
accessGroups = false;
accessEvents = false;
@@ -18,9 +21,9 @@ export class ManageComponent implements OnInit {
ngOnInit() {
this.route.parent.params.subscribe(async (params) => {
- const organization = await this.userService.getOrganization(params.organizationId);
- this.accessEvents = organization.useEvents;
- this.accessGroups = organization.useGroups;
+ this.organization = await this.userService.getOrganization(params.organizationId);
+ this.accessEvents = this.organization.useEvents;
+ this.accessGroups = this.organization.useGroups;
});
}
}
diff --git a/src/app/organizations/manage/people.component.html b/src/app/organizations/manage/people.component.html
index 9009ff8842..7ca94fa5e2 100644
--- a/src/app/organizations/manage/people.component.html
+++ b/src/app/organizations/manage/people.component.html
@@ -48,6 +48,7 @@
{{'owner' | i18n}}
{{'admin' | i18n}}
+ {{'manager' | i18n}}
{{'user' | i18n}}
|
diff --git a/src/app/organizations/manage/people.component.ts b/src/app/organizations/manage/people.component.ts
index 6baab911f2..53cd201e64 100644
--- a/src/app/organizations/manage/people.component.ts
+++ b/src/app/organizations/manage/people.component.ts
@@ -5,7 +5,10 @@ import {
ViewChild,
ViewContainerRef,
} from '@angular/core';
-import { ActivatedRoute } from '@angular/router';
+import {
+ ActivatedRoute,
+ Router,
+} from '@angular/router';
import { ToasterService } from 'angular2-toaster';
import { Angulartics2 } from 'angulartics2';
@@ -58,12 +61,16 @@ export class PeopleComponent implements OnInit {
private i18nService: I18nService, private componentFactoryResolver: ComponentFactoryResolver,
private platformUtilsService: PlatformUtilsService, private analytics: Angulartics2,
private toasterService: ToasterService, private cryptoService: CryptoService,
- private userService: UserService) { }
+ private userService: UserService, private router: Router) { }
async ngOnInit() {
this.route.parent.parent.params.subscribe(async (params) => {
this.organizationId = params.organizationId;
const organization = await this.userService.getOrganization(this.organizationId);
+ if (!organization.isAdmin) {
+ this.router.navigate(['../collections'], { relativeTo: this.route });
+ return;
+ }
this.accessEvents = organization.useEvents;
this.accessGroups = organization.useGroups;
await this.load();
diff --git a/src/app/organizations/manage/user-add-edit.component.html b/src/app/organizations/manage/user-add-edit.component.html
index 81ba0135e4..5fc0277fc4 100644
--- a/src/app/organizations/manage/user-add-edit.component.html
+++ b/src/app/organizations/manage/user-add-edit.component.html
@@ -30,6 +30,13 @@
{{'userDesc' | i18n}}
+
+
+
+
|