Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32197807
D8592.1765104136.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8592.1765104136.diff
View Options
diff --git a/web/components/community-actions-menu.react.js b/web/components/community-actions-menu.react.js
--- a/web/components/community-actions-menu.react.js
+++ b/web/components/community-actions-menu.react.js
@@ -36,6 +36,10 @@
community,
threadPermissions.MANAGE_INVITE_LINKS,
);
+ const canChangeRoles = threadHasPermission(
+ community,
+ threadPermissions.CHANGE_ROLE,
+ );
const openViewInviteLinkModal = React.useCallback(() => {
if (!inviteLink) {
@@ -48,6 +52,8 @@
pushModal(<ManageInviteLinksModal communityID={communityID} />);
}, [communityID, pushModal]);
+ const openCommunityRolesModal = React.useCallback(() => {}, []);
+
const items = React.useMemo(() => {
const itemSpecs = [];
@@ -67,12 +73,22 @@
});
}
+ if (canChangeRoles) {
+ itemSpecs.push({
+ text: 'Roles',
+ icon: 'user-info',
+ onClick: openCommunityRolesModal,
+ });
+ }
+
return itemSpecs;
}, [
canManageLinks,
inviteLink,
openManageInviteLinksModal,
openViewInviteLinkModal,
+ canChangeRoles,
+ openCommunityRolesModal,
]);
const menuItems = React.useMemo(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 7, 10:42 AM (8 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5843544
Default Alt Text
D8592.1765104136.diff (1 KB)
Attached To
Mode
D8592: [web] Display a Roles option in the community menu
Attached
Detach File
Event Timeline
Log In to Comment