}
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",
}
* limitations under the License.
*
*/
-@import 'style/_colors.scss';
+@import '../../style/_colors.scss';
.sqTextInput {
display: -ms-flexbox;
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 {
"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",
"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": "/",
"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",
@import "style/_colors.scss";
.projectManagement {
- max-width: 900px;
+ max-width: 1200px;
.skyquakePanel-wrapper {
overflow-x: hidden;
}
.userTable {
.FormSection-body {
- max-width: 652px;
+ max-width: 952px;
overflow-x: auto;
}
}
*/
import ProjectManagementActions from './projectMgmtActions.js';
import ProjectManagementSource from './projectMgmtSource.js';
+import ROLES from 'utils/roleConstants.js';
import _ from 'lodash';
export default class ProjectManagementStore {
constructor() {
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;
"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",
}
}
- .rbacButtonGroup {
+ .rbacButtonGroup, .buttonSection {
margin: 0 0.5rem 0.5rem;
background: #ddd;
padding-bottom: 0.5rem;
{passwordSectionHTML}
</Panel>
- {formButtonsHTML}
+ <div className="buttonSection">
+ {formButtonsHTML}
+ </div>
</PanelWrapper>
</PanelWrapper>