Skip to content

Commit

Permalink
[#202] Fix RoleGroup select
Browse files Browse the repository at this point in the history
  • Loading branch information
palagdan committed Dec 6, 2024
1 parent 162f71c commit cfb8ca3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/RoleSelector.jsx → src/components/RoleSelector.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useEffect } from "react";
import Select from "react-select";
import PropTypes from "prop-types";
import { ROLE } from "./constants/DefaultConstants.js";
import { ROLE } from "../constants/DefaultConstants.js";
import Row from "react-bootstrap/Row";
import { Col, FormGroup, FormLabel } from "react-bootstrap";

Expand Down
5 changes: 2 additions & 3 deletions src/components/user/User.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import PropTypes from "prop-types";
import { FaRandom } from "react-icons/fa";
import { isUsingOidcAuth } from "../../utils/OidcUtils";
import { getRoles, hasRole, isAdmin } from "../../utils/SecurityUtils";
import RoleSelector from "../../RoleSelector.jsx";
import RoleSelector from "../RoleSelector.jsx";
import IfInternalAuth from "../misc/oidc/IfInternalAuth.jsx";

class User extends React.Component {
Expand Down Expand Up @@ -40,7 +40,6 @@ class User extends React.Component {
this.i18n = this.props.i18n;
this.formatMessage = this.props.formatMessage;
this.state = { savedWithEmail: false };
// this._onRoleSelected = this._onRoleSelected.bind(this);
}

_onChange = (e) => {
Expand Down Expand Up @@ -304,7 +303,7 @@ class User extends React.Component {
labelWidth={3}
inputWidth={8}
onChange={this._onRoleGroupSelected}
value={user.roleGroup ? user.roleGroup : ""}
value={user.roleGroup ? user.roleGroup.uri : ""}
>
{this._generateGroupOptions()}
</HorizontalInput>
Expand Down

0 comments on commit cfb8ca3

Please sign in to comment.