Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-24 18:56:11 +01:00
forgejo/routers/api/v1/repo
Manush Dodunekov 1751d5fcf2 Restricted users (#6274)
* Restricted users (#4334): initial implementation

* Add User.IsRestricted & UI to edit it

* Pass user object instead of user id to places where IsRestricted flag matters

* Restricted users: maintain access rows for all referenced repos (incl public)

* Take logged in user & IsRestricted flag into account in org/repo listings, searches and accesses

* Add basic repo access tests for restricted users

Signed-off-by: Manush Dodunekov <manush@stendahls.se>

* Mention restricted users in the faq

Signed-off-by: Manush Dodunekov <manush@stendahls.se>

* Revert unnecessary change `.isUserPartOfOrg` -> `.IsUserPartOfOrg`

Signed-off-by: Manush Dodunekov <manush@stendahls.se>

* Remove unnecessary `org.IsOrganization()` call

Signed-off-by: Manush Dodunekov <manush@stendahls.se>

* Revert to an `int64` keyed `accessMap`

* Add type `userAccess`
* Add convenience func updateUserAccess()
* Turn accessMap into a `map[int64]userAccess`

Signed-off-by: Manush Dodunekov <manush@stendahls.se>

* or even better: `map[int64]*userAccess`

* updateUserAccess(): use tighter syntax as suggested by lafriks

* even tighter

* Avoid extra loop

* Don't disclose limited orgs to unauthenticated users

* Don't assume block only applies to orgs

* Use an array of `VisibleType` for filtering

* fix yet another thinko

* Ok - no need for u

* Revert "Ok - no need for u"

This reverts commit 5c3e886aab.

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-13 18:33:46 +01:00
..
blob.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
branch.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
collaborators.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
commits.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
file.go [API] Extend contents with dates (#9464) 2019-12-24 10:33:52 +08:00
fork.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
git_hook.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
git_ref.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
hook.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
hook_test.go API endpoint for testing webhook (#3550) 2018-04-29 14:21:33 +08:00
issue.go Restricted users (#6274) 2020-01-13 18:33:46 +01:00
issue_comment.go [API] Add "before" query to ListIssueComments and ListRepoIssue… (#9685) 2020-01-13 17:02:24 +01:00
issue_label.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
issue_reaction.go fix swagger description of reaction API (#9617) 2020-01-06 06:58:13 +02:00
issue_stopwatch.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
issue_subscription.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
issue_tracked_time.go Move tracked time api convert to convert package (#9665) 2020-01-10 21:59:41 -05:00
key.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
label.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
main_test.go API endpoint for testing webhook (#3550) 2018-04-29 14:21:33 +08:00
milestone.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
pull.go Allow repo admin to merge PR regardless of review status (#9611) 2020-01-11 02:29:34 -05:00
release.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
release_attachment.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
repo.go Restricted users (#6274) 2020-01-13 18:33:46 +01:00
repo_test.go Fixes #5960 - Adds API Endpoint for Repo Edit (#7006) 2019-05-30 11:09:05 -04:00
star.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
status.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
subscriber.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
tag.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
topic.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00
tree.go Swagger info corrections (#9441) 2019-12-20 19:07:12 +02:00