Limit the maximum number of followed users
What does this MR do and why?
This MR adds validation to limit the maximum number of people anyone can follow. The current set is 300 as taken for this issue #360755 (comment 1074284968) and once the user reaches this limit, he will be shown an alert (screenshot below) when trying to follow more peoples.
Anyone who is following more than 300 will not be affected. They won't be able to follow more users until they unfollow some and get the count below 300.
Related to: #360755 (comment 1074284968)
Screenshots or screen recordings
Using 2 as limit to demonstrate the alert, normally it will be 300.
API endpoint is used in popup here
How to set up and validate locally
- Follow 300 users or change the limit from
Users::UserFollowUser
and follow that many users - Trying to follow more people will show above alert.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Pradosh Gaonkar