-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CP Staging] fix: allow make admin in paid workspace only #37808
[CP Staging] fix: allow make admin in paid workspace only #37808
Conversation
@ishpaul777 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also hide "Make member"
This is full code change I suggest:
+ if (PolicyUtils.isPaidGroupPolicy(policy) {
if (selectedEmployees.find((employee) => policyMembers?.[employee]?.role === CONST.POLICY.ROLE.ADMIN)) {
options.push({
text: translate('workspace.people.makeMember'),
value: CONST.POLICY.MEMBERS_BULK_ACTION_TYPES.MAKE_MEMBER,
icon: Expensicons.User,
onSelected: () => changeUserRole(CONST.POLICY.ROLE.USER),
});
}
if (selectedEmployees.find((employee) => policyMembers?.[employee]?.role === CONST.POLICY.ROLE.USER)) {
options.push({
text: translate('workspace.people.makeAdmin'),
value: CONST.POLICY.MEMBERS_BULK_ACTION_TYPES.MAKE_ADMIN,
icon: Expensicons.MakeAdmin,
onSelected: () => changeUserRole(CONST.POLICY.ROLE.ADMIN),
});
}
+ }
@mkhutornyi if we want to hide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with the other reviews, the only visible option should be to remove the user
As a new contributor, sign by commenting this:
Also, all commits should be signed |
I have read the CLA Document and I hereby sign the CLA |
@mkhutornyi adding signatures |
fe48b2f
to
a27da67
Compare
icon: Expensicons.MakeAdmin, | ||
onSelected: () => changeUserRole(CONST.POLICY.ROLE.ADMIN), | ||
}); | ||
if(PolicyUtils.isPaidGroupPolicy(policy)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(PolicyUtils.isPaidGroupPolicy(policy)) { | |
if (PolicyUtils.isPaidGroupPolicy(policy)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is done
Signed-off-by: usman-ghani564 <usmanghani564.ug9@gmail.com>
a27da67
to
ab129d0
Compare
@usman-ghani564 we don't allow force pushing, if you want to sign older commits please see this for future reference https://expensify.slack.com/archives/C01GTK53T8Q/p1660778311856709 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeVIDEO-2024-03-06-12-09-03.mp4Android: mWeb ChromeVIDEO-2024-03-06-11-45-30.mp4iOS: NativeScreen.Recording.2024-03-06.at.12.11.20.PM.moviOS: mWeb SafariScreen.Recording.2024-03-06.at.11.33.38.AM.movMacOS: Chrome / SafariScreen.Recording.2024-03-06.at.11.27.08.AM.movMacOS: DesktopScreen.Recording.2024-03-06.at.12.03.01.PM.mov |
just to clarify, force pushing is technically allowed but discouraged unless there's a strong need, because it makes it harder for reviewers to see changes since their last review. retroactively signing commits would be a case where force-pushing might be necessary/appropriate |
ah thanks for clarifying @roryabraham, in past someone told me its not allowed |
@usman-ghani564 please run prettier lint is failing, also add videos for all platforms |
@ishpaul777 prettier error are fixed now. Also, attached videos / screenshots as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 🟢
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…id-ws-only-usmanghani564 [CP Staging] fix: allow make admin in paid workspace only (cherry picked from commit aaa1795)
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 1.4.47-8 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/roryabraham in version: 1.4.47-10 🚀
|
Details
Fixed Issues
$ #37779
PROPOSAL: #37779 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
WhatsApp.Video.2024-03-06.at.12.40.23.PM.mp4
Android: mWeb Chrome
Free Workspace:
WhatsApp.Video.Free.WS.mp4
Paid Workspace:
WhatsApp.Video.Paid.WS.mp4
iOS: Native
WhatsApp.Video.2024-03-06.at.2.32.31.PM.mp4
iOS: mWeb Safari
Free Workspace:
WhatsApp.Video.2024-03-06.at.1.27.21.PM.mp4
Paid Workspace:
WhatsApp.Video.2024-03-06.at.1.27.22.PM.mp4
MacOS: Chrome / Safari
MacOS: Desktop
Free Workspace:


Paid Workspace:

