x x x
x
Only portrait mode is currently supported - please rotate your device.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Give edit company profile permission to company members

...

Custom section


Custom column
Heightauto
Width15%


Show If
groupconfluence-administrators,morganstanley-admins
Custom column
Heightauto
Width15%


HTML
<a class="edit-btn" id="edit-profile-btn"> <button> Edit Profile</button></a>
<a class="edit-btn" id="edit-picture-btn"> <button> Edit Profile Picture</button></a>

<script>
document.getElementById('edit-profile-btn').href = `/display/MSCOM/Edit+Company+Profile?username=${param_name}`
const getCurrentUserGroups = async () => {
  let res = await jQuery.ajax({
    url: "/rest/api/user/memberof?username=" + AJS.params.remoteUser, 
    type: "get", 
    dataType: 'json', 
    async: true
  }).then(res => res);

  res = res.results;
  let groupNames = [];
  for(var i = 0; i < res.length; i++){
    groupNames.push(res[i].name);
  }

  return groupNames;
}

let companyName = new URLSearchParams(window.location.search).get("company");
const companyMember = `morganstanley-${companyName}-users`;
getCurrentUserGroups().then((groups) => {
    if (groups.includes("confluence-administrators") || groups.includes("morganstanley-admins") || groups.includes(companyMember)) {
      document.getElementById('edit-profile-btn').href = `/display/MSCOM/Edit+Company+Profile?username=${param_name}`;
      document.getElementById('edit-picture-btn').href = `/display/MSCOM/Edit+Profile+Picture?username=${param_name}`;
      document.getElementById('edit-profile-btn').display = "initial";
      document.getElementById('edit-picture-btn').display = "initial";
    }
    else {
      document.getElementById('edit-profile-btn').display = "none";
      document.getElementById('edit-picture-btn').
href
display =
`/display/MSCOM/Edit+Profile+Picture?username=${param_name}`
 "none";
    }
})
</script>



Dynamic general sidebar
MessageButtonTitleWebsite
MessageButtonCustomCSSbackground-color: #6781ca;
BackButtonCustomCSSbackground-color: #636363;
BackButtonUrl/display/MEM/Network#tab-COMPANIES
SidebarHeight100%
BackButtonTitleBack to Companies


Custom column
Heightauto
Width85%


General content
ContentHeight120hv


HTML
<img src="" class="service-banner hide-on-mobile">


General description
MyTitle-

-


General description
MyTitle-
BodyCSScontent: "";



General info cards

List members company
GroupNamemorganstanley- -users
CardURL/display/MSPEOP/Bio+Profile?mentor=




...