changes.mady.by.user Me Me Mon
Saved on Feb 17, 2022
...
<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').style.display = "none"; document.getElementById('edit-picture-btn').style.display = "none"; 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').style.display = "initialflex"; document.getElementById('edit-pictureprofile-btn').style.displayjustifyContent = "initialcenter"; } else {    document.getElementById('edit-profilepicture-btn').style.display = "noneflex";   document document.getElementById('edit-picture-btn').style.displayjustifyContent = "nonecenter";  } }) </script>
<img src="" class="service-banner hide-on-mobile">
-