• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 11967882347
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/DEV-1763-yoke-params
DEFAULT BRANCH: master
Ran 22 Nov 2024 07:27AM UTC
Jobs 1
Files 608
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Nov 2024 06:50AM UTC coverage: 80.006% (+0.04%) from 79.969%
11967882347

push

github

web-flow
feat(organizations): add endpoints to handle organization members TASK-963 (#5235)

### đŸ“Ŗ Summary
- Enhance the organization member management API to support role updates
and member removal via PATCH and DELETE requests, excluding member
creation.


### 📖 Description
- This update introduces endpoints for managing organization members:

- GET `/api/v2/organizations/<org-id>/members/` to list all members in
an organization.
- PATCH `/api/v2/organizations/<org-id>/members/<username>/` to update a
member's role (e.g., promote to admin).
- DELETE `/api/v2/organizations/<org-id>/members/<username>/` to remove
a member from the organization.

Note: Creating members is not supported via this endpoint. Roles are
restricted to 'admin' or 'member'. Including the details of invited
members (those who have not yet joined the organization) is not covered
in this update.


### 👷 Description for instance maintainers
- This update provides new functionality to manage organization members:

- Role updates for members (promotion/demotion between 'admin' and
'member').
    - Member removal from an organization.
- The endpoints are optimized to use database joins to fetch member
roles efficiently without excessive database queries, ensuring minimal
load.



### 👀 Preview steps
1. â„šī¸ Have an account and an organization with multiple members.
2. Use the GET method to list the members of the organization.
3. Use the PATCH method to update a member's role (e.g., promote a user
to admin).
4. Use the DELETE method to remove a member from the organization.
5. đŸŸĸ Notice the endpoints behave as expected, with valid role updates
and member removal.


### 💭 Notes
- The code uses database joins to optimize role determination for
members, avoiding inefficient role lookups.
- Role validation restricts role assignments to 'admin' or 'member'
only.
- Including invited members' details is not covered in this update. This
will be implemente... (continued)

5640 of 9102 branches covered (61.96%)

59 of 60 new or added lines in 4 files covered. (98.33%)

2 existing lines in 1 file now uncovered.

21588 of 26983 relevant lines covered (80.01%)

0.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 11967882347.1 22 Nov 2024 07:27AM UTC 0
80.01
Source Files on build 11967882347
Detailed source file information is not available for this build.
  • Back to Repo
  • 79e33e86 on github
  • Prev Build on main (#11961053709)
  • Next Build on main (#12014598877)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc