You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ui): set MAX_MEMBERS_PER_TEAM in team forms (#3650)
* fix(ui): set MAX_MEMBERS_PER_TEAM in team forms
The "Maximum Members" input in the Create Team and Edit Team modals
had max="1000" hardcoded, causing two problems:
- non-admin users could set max_members above MAX_MEMBERS_PER_TEAM
- when MAX_MEMBERS_PER_TEAM > 1000, the browser rejected valid values
Fix by surfacing the setting to the UI with role-aware behaviour:
- admins: no max attribute (no browser-side cap, matching skip_limits in the backend)
- non-admins: max attribute set to MAX_MEMBERS_PER_TEAM (default 100)
The default value in the Create modal is min(50, MAX_MEMBERS_PER_TEAM)
so tighter operator-configured limits are respected out of the box.
Closes#3589
Signed-off-by: Gabriel Costa <gabrielcg@proton.me>
* fix(teams): use extracted is_admin var in update_team, add boundary test
Use the already-extracted `is_admin` variable for `skip_limits` in
update_team instead of re-evaluating `bool(current_user.get("is_admin"))`.
Add missing boundary test for non-admin update at exactly the configured
max_members_per_team limit, matching the create-path coverage.
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* fix(ui): handle over-limit max_members in non-admin team edit form
When a non-admin user edits a team whose max_members already exceeds the
configured MAX_MEMBERS_PER_TEAM (e.g. set by an admin), the HTML form
would render value > max, causing browser validation to block submission.
Fix by showing an empty field with a hint displaying the current value
and the allowed limit. Submitting empty preserves the existing value
server-side. Admins continue to see the actual value with no cap.
Add regression tests for both admin and non-admin over-limit edit cases.
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
* fix(docs): add missing docstring sections in passthrough_headers
Add missing Args and Returns to _loopback_skip_set,
safe_extract_headers_for_loopback, and
safe_extract_and_filter_for_loopback to satisfy flake8 DAR checks.
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
---------
Signed-off-by: Gabriel Costa <gabrielcg@proton.me>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Co-authored-by: Mihai Criveti <crivetimihai@gmail.com>
0 commit comments