Initial RBAC plugin display. Included about and debug page not rendering fix
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
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 {