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

kobotoolbox / kpi / 12127294891
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 02 Dec 2024 08:55PM UTC
Jobs 1
Files 609
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

02 Dec 2024 08:19PM UTC coverage: 80.295% (+0.2%) from 80.119%
12127294891

push

github

web-flow
feat(ProjectHistoryLogs): create ph logs for permissions changes TASK-944 (#5297)



### 📣 Summary
Create project history logs when users are assigned permissions or have
permissions revoked for a project.

### 👀 Preview steps
Note: for this test, all PH logs should have
`metadata['log_subtype']='permission'` and `metadata['asset_uid']=<the
uid of the project you're updating>`

1. ℹ️ have 3 accounts (at least 2 non-superuser). For this test we'll
call them user1, user2, and user3 (user2 and user3 are not super)
2.  ℹ️  have a project owned by user1 with at least 1 submission
3. Log in as user1
4. Go to Project > Settings > Sharing
5. Toggle 'Allow submissions to this form without a username and
password'
6. Go to `/api/v2/audit-logs/?q=log_type:project-history AND
metadata__asset_uid:<Project1.uid>`
7. 🟢 There should be a new PH log with
action='allow-anonymous-submissions' (usual metadata)
8. Toggle 'Allow submissions...' off again
9. 🟢 Reload the endpoint. There should be a new PH log with
action='disallow-anonymous-submissions'
10. Check "Anyone can view this form"
11. 🟢 Reload the endpoint. There should be a new PH log with
action='share-form-publicly'
12. Check "Anyone can view submissions made to this form"
13. 🟢 Reload the endpoint. There should be a new PH log with
action='share-data-publicly'
14. Uncheck "Anyone can view submissions made to this form"
15. 🟢 Reload the endpoint. There should be a new PH log with
action='unshare-data-publicly'
16. Uncheck "Anyone can view this form"
17. 🟢 Reload the endpoint. There should be a new PH log with
action='unshare-form-publicly'
18. Click 'Add User'. Grant user2 permission to Edit Form
19. 🟢 Reload the endpoint. There should be a new PH log with
action='modify-user-permissions' and
```
metadata['permissions'] =
{
"username": "user2",
"added": ["change_asset", "view_asset"],  # order doesn't matter
"removed":[]
}
```
20. Uncheck "Edit form" and check "Ed... (continued)

5722 of 9198 branches covered (62.21%)

116 of 117 new or added lines in 7 files covered. (99.15%)

21829 of 27186 relevant lines covered (80.3%)

0.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 12127294891.1 02 Dec 2024 08:56PM UTC 0
80.3
Source Files on build 12127294891
Detailed source file information is not available for this build.
  • Back to Repo
  • 4c3da9bf on github
  • Prev Build on main (#12126321618)
  • Next Build on main (#12130330644)
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