@@ -487,11 +487,26 @@ Feature: provisioning
487487 Given As an "admin"
488488 And user "brand-new-user" exists
489489 And group "new-group" exists
490+ And group "other-group" exists
490491 When sending "POST" to "/cloud/users/brand-new-user/subadmins" with
491492 | groupid | new -group |
492493 Then the OCS status code should be "100"
493494 And the HTTP status code should be "200"
494495
496+ # Ensure self promotion is not possible
497+ Given As an "brand-new-user"
498+ When sending "POST" to "/cloud/users/brand-new-user/groups" with
499+ | groupid | admin |
500+ Then the OCS status code should be "104"
501+ And the HTTP status code should be "200"
502+
503+ # Ensure self adding to other groups is not possible
504+ Given As an "brand-new-user"
505+ When sending "POST" to "/cloud/users/brand-new-user/groups" with
506+ | groupid | other -group |
507+ Then the OCS status code should be "104"
508+ And the HTTP status code should be "200"
509+
495510 Scenario : get users using a subadmin
496511 Given As an "admin"
497512 And user "brand-new-user" exists
@@ -793,7 +808,7 @@ Feature: provisioning
793808 Then the HTTP status code should be "200"
794809 And user "subadmin" is disabled
795810
796- Scenario : Admin user cannot disable himself
811+ Scenario : Admin user cannot disable themself
797812 Given As an "admin"
798813 And user "another-admin" exists
799814 And user "another-admin" belongs to group "admin"
@@ -804,7 +819,7 @@ Feature: provisioning
804819 And As an "admin"
805820 And user "another-admin" is enabled
806821
807- Scenario :Admin user cannot enable himself
822+ Scenario : Admin user cannot enable themself
808823 Given As an "admin"
809824 And user "another-admin" exists
810825 And user "another-admin" belongs to group "admin"
@@ -837,7 +852,7 @@ Feature: provisioning
837852 And As an "admin"
838853 And user "user2" is disabled
839854
840- Scenario : Subadmin should not be able to disable himself
855+ Scenario : Subadmin should not be able to disable themself
841856 Given As an "admin"
842857 And user "subadmin" exists
843858 And group "new-group" exists
@@ -850,7 +865,7 @@ Feature: provisioning
850865 And As an "admin"
851866 And user "subadmin" is enabled
852867
853- Scenario : Subadmin should not be able to enable himself
868+ Scenario : Subadmin should not be able to enable themself
854869 Given As an "admin"
855870 And user "subadmin" exists
856871 And group "new-group" exists
0 commit comments