fix: Enable Roles and Groups Display on Cloud Instances (#41068)
This commit is contained in:
parent
f379f16bdd
commit
be3aef333b
|
|
@ -5,6 +5,5 @@ import com.appsmith.server.dtos.UserProfileDTO;
|
|||
import reactor.core.publisher.Mono;
|
||||
|
||||
public interface PACConfigurationServiceCE {
|
||||
Mono<UserProfileDTO> setRolesAndGroups(
|
||||
UserProfileDTO profile, User user, boolean showUsersAndGroups, boolean isCloudHosting);
|
||||
Mono<UserProfileDTO> setRolesAndGroups(UserProfileDTO profile, User user, boolean showUsersAndGroups);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,7 @@ import static com.appsmith.server.constants.ce.AccessControlConstantsCE.UPGRADE_
|
|||
@Service
|
||||
public class PACConfigurationServiceCEImpl implements PACConfigurationServiceCE {
|
||||
@Override
|
||||
public Mono<UserProfileDTO> setRolesAndGroups(
|
||||
UserProfileDTO profile, User user, boolean showUsersAndGroups, boolean isCloudHosting) {
|
||||
public Mono<UserProfileDTO> setRolesAndGroups(UserProfileDTO profile, User user, boolean showUsersAndGroups) {
|
||||
profile.setRoles(
|
||||
List.of(UPGRADE_TO_BUSINESS_EDITION_TO_ACCESS_ROLES_AND_GROUPS_FOR_CONDITIONAL_BUSINESS_LOGIC));
|
||||
profile.setGroups(
|
||||
|
|
|
|||
|
|
@ -775,8 +775,7 @@ public class UserServiceCEImpl extends BaseService<UserRepository, User, String>
|
|||
commonConfig.isCloudHosting() ? true : userData.isIntercomConsentGiven());
|
||||
profile.setSuperUser(isSuperUser);
|
||||
profile.setConfigurable(!StringUtils.isEmpty(commonConfig.getEnvFilePath()));
|
||||
return pacConfigurationService.setRolesAndGroups(
|
||||
profile, userFromDb, true, commonConfig.isCloudHosting());
|
||||
return pacConfigurationService.setRolesAndGroups(profile, userFromDb, true);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class PACConfigurationServiceCETest {
|
|||
public void test_setRolesAndGroups_featureFlagDisabled() {
|
||||
UserProfileDTO userProfileDTO = new UserProfileDTO();
|
||||
Mono<UserProfileDTO> userProfileDTOMono =
|
||||
pacConfigurationService.setRolesAndGroups(userProfileDTO, null, false, false);
|
||||
pacConfigurationService.setRolesAndGroups(userProfileDTO, null, false);
|
||||
StepVerifier.create(userProfileDTOMono)
|
||||
.assertNext(userProfileDTO1 -> {
|
||||
assertThat(userProfileDTO1.getRoles())
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user