Merge "RIFT-16172: Project switch does not affect polling and socket pages." into projects
diff --git a/skyquake/framework/utils/roleConstants.js b/skyquake/framework/utils/roleConstants.js
index 95e36fc..96c4bf3 100644
--- a/skyquake/framework/utils/roleConstants.js
+++ b/skyquake/framework/utils/roleConstants.js
@@ -7,8 +7,12 @@
}
c.PROJECT = {
- MANO_OPER: "rw-project-mano:mano-oper",
- MANO_ADMIN: "rw-project-mano:mano-admin",
+ CATALOG_OPER: "rw-project-mano:catalog-oper",
+ CATALOG_ADMIN: "rw-project-mano:catalog-admin",
+ LCM_OPER: "rw-project-mano:lcm-oper",
+ LCM_ADMIN: "rw-project-mano:lcm-admin",
+ ACCOUNT_OPER: "rw-project-mano:account-oper",
+ ACCOUNT_ADMIN: "rw-project-mano:account-admin",
PROJECT_ADMIN: "rw-project:project-admin",
PROJECT_OPER: "rw-project:project-oper",
}
diff --git a/skyquake/framework/widgets/form_controls/formControls.scss b/skyquake/framework/widgets/form_controls/formControls.scss
index afa8508..1e29db7 100644
--- a/skyquake/framework/widgets/form_controls/formControls.scss
+++ b/skyquake/framework/widgets/form_controls/formControls.scss
@@ -15,7 +15,7 @@
* limitations under the License.
*
*/
-@import 'style/_colors.scss';
+@import '../../style/_colors.scss';
.sqTextInput {
display: -ms-flexbox;
diff --git a/skyquake/framework/widgets/skyquake_rbac/skyquakeRBAC.jsx b/skyquake/framework/widgets/skyquake_rbac/skyquakeRBAC.jsx
index e00e672..cbb6a56 100644
--- a/skyquake/framework/widgets/skyquake_rbac/skyquakeRBAC.jsx
+++ b/skyquake/framework/widgets/skyquake_rbac/skyquakeRBAC.jsx
@@ -26,15 +26,16 @@
super(props);
}
render() {
- const User = this.context.userProfile.data;
+ const User = this.context.userProfile;
+ const UserData = User.data;
let HTML = null;
// If user object has platform property then it has been populated by the back end.
- if(User) {
- const PlatformRole = User.platform.role;
+ if(UserData) {
+ const PlatformRole = UserData.platform.role;
const isPlatformSuper = PlatformRole[PLATFORM.SUPER];
const isPlatformAdmin = PlatformRole[PLATFORM.ADMIN];
const isPlatformOper = PlatformRole[PLATFORM.OPER];
- const hasRoleAccess = checkForRoleAccess(User.project[this.props.project], PlatformRole, this.props.allow)//false//(this.props.roles.indexOf(userProfile.projectRole) > -1)
+ const hasRoleAccess = checkForRoleAccess(UserData.project[User.projectId], PlatformRole, this.props.allow)//false//(this.props.roles.indexOf(userProfile.projectRole) > -1)
if (isPlatformSuper) {
HTML = this.props.children;
} else {
diff --git a/skyquake/plugins/accounts/config.json b/skyquake/plugins/accounts/config.json
index 7bea692..3582888 100644
--- a/skyquake/plugins/accounts/config.json
+++ b/skyquake/plugins/accounts/config.json
@@ -4,6 +4,7 @@
"dashboard": "./account/accountsDashboard.jsx",
"order": 3,
"priority":1,
+ "allow": ["rw-rbac-platform:super-admin", "rw-project-mano:account-oper", "rw-project-mano:account-admin"],
"routes": [
{
"label": "Accounts Dashboard",
diff --git a/skyquake/plugins/composer/config.json b/skyquake/plugins/composer/config.json
index 80a2a0c..34b1084 100644
--- a/skyquake/plugins/composer/config.json
+++ b/skyquake/plugins/composer/config.json
@@ -5,6 +5,10 @@
"name": "Catalog",
"dashboard" : "./src/components/ComposerApp.js",
"order": 2,
+ "allow": [
+ "rw-rbac-platform:super-admin",
+ "rw-project-mano:catalog-oper",
+ "rw-project-mano:catalog-admin"],
"routes" : [{
"label": "Catalog",
"route": "/",
diff --git a/skyquake/plugins/launchpad/config.json b/skyquake/plugins/launchpad/config.json
index 851239f..1f4d145 100644
--- a/skyquake/plugins/launchpad/config.json
+++ b/skyquake/plugins/launchpad/config.json
@@ -4,6 +4,7 @@
"dashboard": "./launchpad.jsx",
"order": 1,
"priority":1,
+ "allow": ["rw-rbac-platform:super-admin", "rw-project-mano:lcm-oper", "rw-project-mano:lcm-admin"],
"routes": [
{
"label": "Dashboard",
diff --git a/skyquake/plugins/project_management/src/dashboard/projectMgmt.scss b/skyquake/plugins/project_management/src/dashboard/projectMgmt.scss
index a21aaa9..eca6a59 100644
--- a/skyquake/plugins/project_management/src/dashboard/projectMgmt.scss
+++ b/skyquake/plugins/project_management/src/dashboard/projectMgmt.scss
@@ -6,7 +6,7 @@
@import "style/_colors.scss";
.projectManagement {
- max-width: 900px;
+ max-width: 1200px;
.skyquakePanel-wrapper {
overflow-x: hidden;
@@ -154,7 +154,7 @@
}
.userTable {
.FormSection-body {
- max-width: 652px;
+ max-width: 952px;
overflow-x: auto;
}
}
diff --git a/skyquake/plugins/project_management/src/dashboard/projectMgmtStore.js b/skyquake/plugins/project_management/src/dashboard/projectMgmtStore.js
index ec3a099..71c10a2 100644
--- a/skyquake/plugins/project_management/src/dashboard/projectMgmtStore.js
+++ b/skyquake/plugins/project_management/src/dashboard/projectMgmtStore.js
@@ -3,6 +3,7 @@
*/
import ProjectManagementActions from './projectMgmtActions.js';
import ProjectManagementSource from './projectMgmtSource.js';
+import ROLES from 'utils/roleConstants.js';
import _ from 'lodash';
export default class ProjectManagementStore {
constructor() {
@@ -15,8 +16,10 @@
this.projectUsers = [];
this.selectedUser = null;
this.selectedRole = null;
- this.roles = ['rw-project:project-admin', 'rw-project:project-oper', 'rw-project:project-create'
- ];
+ this.roles = Object.keys(ROLES.PROJECT).map((p) => {
+ return ROLES.PROJECT[p];
+ })
+ // this.roles = ['rw-project:project-admin', 'rw-project:project-oper', 'rw-project:project-create'];
this.users = [];
this.activeIndex = null;
this.isReadOnly = true;
diff --git a/skyquake/plugins/user_management/config.json b/skyquake/plugins/user_management/config.json
index 0366214..38de12f 100644
--- a/skyquake/plugins/user_management/config.json
+++ b/skyquake/plugins/user_management/config.json
@@ -11,7 +11,8 @@
"label": "User Management Dashboard",
"route": "user-management",
"component": "./dashboard/dashboard.jsx",
- "type": "internal"
+ "type": "internal",
+ "allow": ["rw-rbac-platform:super-admin", "rw-rbac-platform:platform-admin", "rw-rbac-platform:platform-oper"]
},{
"label": "Platform Role Management",
"route": "platform",
diff --git a/skyquake/plugins/user_management/src/dashboard/userMgmt.scss b/skyquake/plugins/user_management/src/dashboard/userMgmt.scss
index 4e935ea..a265f0d 100644
--- a/skyquake/plugins/user_management/src/dashboard/userMgmt.scss
+++ b/skyquake/plugins/user_management/src/dashboard/userMgmt.scss
@@ -83,7 +83,7 @@
}
}
- .rbacButtonGroup {
+ .rbacButtonGroup, .buttonSection {
margin: 0 0.5rem 0.5rem;
background: #ddd;
padding-bottom: 0.5rem;
diff --git a/skyquake/plugins/user_management/src/userProfile/userProfile.jsx b/skyquake/plugins/user_management/src/userProfile/userProfile.jsx
index d7cb600..a786858 100644
--- a/skyquake/plugins/user_management/src/userProfile/userProfile.jsx
+++ b/skyquake/plugins/user_management/src/userProfile/userProfile.jsx
@@ -237,7 +237,9 @@
{passwordSectionHTML}
</Panel>
- {formButtonsHTML}
+ <div className="buttonSection">
+ {formButtonsHTML}
+ </div>
</PanelWrapper>
</PanelWrapper>