Skip to content

Commit

Permalink
Merge pull request #536 from AI4Bharat/CL-622
Browse files Browse the repository at this point in the history
showing correct profile info
  • Loading branch information
harsh12-99 authored Jan 11, 2024
2 parents 683d77c + 349da64 commit d9c2095
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/containers/UserManagement/EditProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const EditProfile = () => {
const langObj = new FetchSupportedLanguagesAPI("TRANSLATION");
dispatch(APITransport(langObj));
// eslint-disable-next-line
}, []);
}, [id]);

useEffect(() => {
if (userData?.email && userData?.role) {
Expand Down Expand Up @@ -250,7 +250,11 @@ const EditProfile = () => {
const { id: userId, role } = loggedInUserData;

if (userId === +id) {
if (role === "ADMIN" || userId === orgOwnerId) {
if (
role === "ADMIN" ||
userId === orgOwnerId ||
role === "PROJECT_MANAGER"
) {
return name === "org" || name === "availability";
} else {
return name === "role" || name === "org" || name === "availability";
Expand Down

0 comments on commit d9c2095

Please sign in to comment.