diff --git a/app/resources/locales/en_US/information.po b/app/resources/locales/en_US/information.po
index f129fe850..2cb458542 100644
--- a/app/resources/locales/en_US/information.po
+++ b/app/resources/locales/en_US/information.po
@@ -36,6 +36,12 @@ msgstr "You are not an active member in any collaboration. If your request for e
msgid "cos.select"
msgstr "Please select the collaboration (CO) you wish to manage."
+msgid "cmp.config.notice"
+msgstr "Looking for platform-wide configurations? Those are found in the COmanage CO."
+
+msgid "cmp.welcome"
+msgstr "The COmanage CO provides platform-wide configurations."
+
msgid "entity.id"
msgstr "ID: {0}"
diff --git a/app/resources/locales/en_US/menu.po b/app/resources/locales/en_US/menu.po
index 2512352b0..d723e2209 100644
--- a/app/resources/locales/en_US/menu.po
+++ b/app/resources/locales/en_US/menu.po
@@ -66,6 +66,9 @@ msgstr "CO Setup"
msgid "co.configuration.panel.setup.desc"
msgstr "Settings for the current CO"
+msgid "co.configuration.title.common"
+msgstr "Common CO Settings"
+
msgid "co.connections"
msgstr "Connections"
diff --git a/app/src/Controller/AppController.php b/app/src/Controller/AppController.php
index d29da07e6..a189d1de6 100644
--- a/app/src/Controller/AppController.php
+++ b/app/src/Controller/AppController.php
@@ -146,6 +146,9 @@ public function beforeRender(\Cake\Event\EventInterface $event) {
if(isset($this->RegistryAuth)) {
// Components might not be loaded on error, so check
$this->set('vv_menu_permissions', $this->RegistryAuth->getMenuPermissions($this->getCOID()));
+
+ // Provide the user's application roles to the views.
+ $this->set('vv_user_roles', $this->RegistryAuth->getApplicationUserRoles($this->getCOID()));
}
return parent::beforeRender($event);
diff --git a/app/src/Controller/Component/RegistryAuthComponent.php b/app/src/Controller/Component/RegistryAuthComponent.php
index b59f0511a..71a15017e 100644
--- a/app/src/Controller/Component/RegistryAuthComponent.php
+++ b/app/src/Controller/Component/RegistryAuthComponent.php
@@ -422,6 +422,32 @@ public function calculatePermissionsForView(string $action, ?int $id=null): arra
return $this->calculatePermissions($id);
}
+ /**
+ * Obtain the application role of the user for general use in the views
+ *
+ * @since COmanage Registry v5.0.0
+ * @param int $coId Current CO ID, if known
+ * @return array $appRoles Array of roles
+ */
+
+ public function getApplicationUserRoles(?int $coId): array {
+ $appUserRoles = [];
+
+ // True for platform administrator
+ $appUserRoles['platform'] = $this->isPlatformAdmin();
+
+ // True for CO administrator
+ $appUserRoles['co'] = $this->isCoAdmin($coId);
+
+ // TODO: add other application roles such as 'cou' and 'support'
+ // See: https://spaces.at.internet2.edu/display/COmanage/Registry+PE+Permissions
+
+ // True if user is authenticated
+ $appUserRoles['authuser'] = $this->isAuthenticatedUser();
+
+ return $appUserRoles;
+ }
+
/**
* Obtain the identifier of the currently authenticated user.
*
@@ -546,6 +572,20 @@ public function isApiUser(): bool {
return $this->authenticatedApiUser;
}
+ /**
+ * Determine if the current user is authenticated.
+ *
+ * @since COmanage Registry v5.0.0
+ * @return bool True if the current user is authenticated
+ */
+
+ public function isAuthenticatedUser(): bool {
+ if(!empty($this->getAuthenticatedUser())) {
+ return true;
+ }
+ return false;
+ }
+
/**
* Determine if the current user is a CO Administrator.
*
diff --git a/app/templates/Dashboards/configuration.php b/app/templates/Dashboards/configuration.php
index e7ab5bec9..5bfae097c 100644
--- a/app/templates/Dashboards/configuration.php
+++ b/app/templates/Dashboards/configuration.php
@@ -34,6 +34,8 @@
= __d('menu','co.configuration.panel.platform') ?>
+
+
+ = __d('menu','co.configuration.title.common') ?>
= __d('menu','menu.introduction') ?>