projects
/
osm
/
UI.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2ff1ddb
)
Initial RBAC plugin display. Included about and debug page not rendering fix
author
Laurence Maultsby
<laurence.maultsby@riftio.com>
Tue, 11 Apr 2017 14:54:26 +0000
(10:54 -0400)
committer
Laurence Maultsby
<laurence.maultsby@riftio.com>
Tue, 11 Apr 2017 14:54:26 +0000
(10:54 -0400)
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
skyquake/framework/utils/roleConstants.js
patch
|
blob
|
history
skyquake/framework/widgets/form_controls/formControls.scss
patch
|
blob
|
history
skyquake/framework/widgets/skyquake_rbac/skyquakeRBAC.jsx
patch
|
blob
|
history
skyquake/plugins/accounts/config.json
patch
|
blob
|
history
skyquake/plugins/composer/config.json
patch
|
blob
|
history
skyquake/plugins/launchpad/config.json
patch
|
blob
|
history
skyquake/plugins/project_management/src/dashboard/projectMgmt.scss
patch
|
blob
|
history
skyquake/plugins/project_management/src/dashboard/projectMgmtStore.js
patch
|
blob
|
history
skyquake/plugins/user_management/config.json
patch
|
blob
|
history
skyquake/plugins/user_management/src/dashboard/userMgmt.scss
patch
|
blob
|
history
skyquake/plugins/user_management/src/userProfile/userProfile.jsx
patch
|
blob
|
history
diff --git
a/skyquake/framework/utils/roleConstants.js
b/skyquake/framework/utils/roleConstants.js
index
95e36fc
..
96c4bf3
100644
(file)
--- a/
skyquake/framework/utils/roleConstants.js
+++ b/
skyquake/framework/utils/roleConstants.js
@@
-7,8
+7,12
@@
c.PLATFORM = {
}
c.PROJECT = {
}
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",
}
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
(file)
--- a/
skyquake/framework/widgets/form_controls/formControls.scss
+++ b/
skyquake/framework/widgets/form_controls/formControls.scss
@@
-15,7
+15,7
@@
* limitations under the License.
*
*/
* limitations under the License.
*
*/
-@import 'style/_colors.scss';
+@import '
../../
style/_colors.scss';
.sqTextInput {
display: -ms-flexbox;
.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
(file)
--- a/
skyquake/framework/widgets/skyquake_rbac/skyquakeRBAC.jsx
+++ b/
skyquake/framework/widgets/skyquake_rbac/skyquakeRBAC.jsx
@@
-26,15
+26,16
@@
export default class SkyquakeRBAC extends React.Component {
super(props);
}
render() {
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.
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(User
Data
) {
+ const PlatformRole = User
Data
.platform.role;
const isPlatformSuper = PlatformRole[PLATFORM.SUPER];
const isPlatformAdmin = PlatformRole[PLATFORM.ADMIN];
const isPlatformOper = PlatformRole[PLATFORM.OPER];
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(User
Data.project[User.projectId
], PlatformRole, this.props.allow)//false//(this.props.roles.indexOf(userProfile.projectRole) > -1)
if (isPlatformSuper) {
HTML = this.props.children;
} else {
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
(file)
--- a/
skyquake/plugins/accounts/config.json
+++ b/
skyquake/plugins/accounts/config.json
@@
-4,6
+4,7
@@
"dashboard": "./account/accountsDashboard.jsx",
"order": 3,
"priority":1,
"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",
"routes": [
{
"label": "Accounts Dashboard",
diff --git
a/skyquake/plugins/composer/config.json
b/skyquake/plugins/composer/config.json
index
80a2a0c
..
34b1084
100644
(file)
--- 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,
"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": "/",
"routes" : [{
"label": "Catalog",
"route": "/",
diff --git
a/skyquake/plugins/launchpad/config.json
b/skyquake/plugins/launchpad/config.json
index
851239f
..
1f4d145
100644
(file)
--- a/
skyquake/plugins/launchpad/config.json
+++ b/
skyquake/plugins/launchpad/config.json
@@
-4,6
+4,7
@@
"dashboard": "./launchpad.jsx",
"order": 1,
"priority":1,
"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",
"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
(file)
--- 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 {
@import "style/_colors.scss";
.projectManagement {
- max-width:
9
00px;
+ max-width:
12
00px;
.skyquakePanel-wrapper {
overflow-x: hidden;
.skyquakePanel-wrapper {
overflow-x: hidden;
@@
-154,7
+154,7
@@
}
.userTable {
.FormSection-body {
}
.userTable {
.FormSection-body {
- max-width:
6
52px;
+ max-width:
9
52px;
overflow-x: auto;
}
}
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
(file)
--- 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 ProjectManagementActions from './projectMgmtActions.js';
import ProjectManagementSource from './projectMgmtSource.js';
+import ROLES from 'utils/roleConstants.js';
import _ from 'lodash';
export default class ProjectManagementStore {
constructor() {
import _ from 'lodash';
export default class ProjectManagementStore {
constructor() {
@@
-15,8
+16,10
@@
export default class ProjectManagementStore {
this.projectUsers = [];
this.selectedUser = null;
this.selectedRole = null;
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;
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
(file)
--- 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",
"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",
},{
"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
(file)
--- 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;
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
(file)
--- a/
skyquake/plugins/user_management/src/userProfile/userProfile.jsx
+++ b/
skyquake/plugins/user_management/src/userProfile/userProfile.jsx
@@
-237,7
+237,9
@@
class UserProfileDashboard extends React.Component {
{passwordSectionHTML}
</Panel>
{passwordSectionHTML}
</Panel>
- {formButtonsHTML}
+ <div className="buttonSection">
+ {formButtonsHTML}
+ </div>
</PanelWrapper>
</PanelWrapper>
</PanelWrapper>
</PanelWrapper>