forgejo/models/migrations
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 5c3e886aabd5acd997a3b35687d322439732c200.

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
..
migrations.go Restricted users (#6274) 2020-01-13 18:33:46 +01:00
v13.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v14.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v15.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v16.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v17.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v18.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v19.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v20.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v21.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v22.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v23.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v24.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v25.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v26.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v27.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v28.go Stop using git count-objects and use raw directory size for repository (#8848) 2019-11-10 21:33:47 +00:00
v29.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v30.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v31.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v32.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v33.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v34.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v35.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v36.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v37.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v38.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v39.go Move some repository methods from models to modules/repository (#9353) 2019-12-14 18:30:01 +01:00
v40.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v41.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v45.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v46.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v47.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v48.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v49.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v50.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v51.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v52.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v53.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v54.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v55.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v56.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v57.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v58.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v59.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v60.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v61.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v62.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v63.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v64.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v65.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v66.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v67.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v68.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v69.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v70.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v71.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v72.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v73.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v74.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v75.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v76.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v77.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v78.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v79.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v80.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v81.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v82.go Add Close() method to gogitRepository (#8901) 2019-11-13 07:01:19 +00:00
v83.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v84.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v85.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v86.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v87.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v88.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v89.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v90.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v91.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v92.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v93.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v94.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v95.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v96.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v97.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v98.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v99.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v100.go Upgrade xorm to v0.8.0 (#8536) 2019-10-17 11:26:49 +02:00
v101.go Allow more than 255 characters for tokens in external_login_user table (#8554) 2019-10-18 09:58:36 +03:00
v102.go Fix bug on pull requests when transfer head repository (#8564) 2019-10-18 19:13:31 +08:00
v103.go Allow Protected Branches to Whitelist Deploy Keys (#8483) 2019-10-21 09:21:45 +01:00
v104.go Fix extra columns from label table (#8633) 2019-10-23 14:48:32 +03:00
v105.go Add team option to grant rights for all organization repositories (#8688) 2019-11-06 11:37:14 +02:00
v106.go Auto-subscribe user to repository when they commit/tag to it (#7657) 2019-11-10 09:22:19 +00:00
v107.go Template Repositories (#8768) 2019-11-11 23:15:29 +08:00
v108.go Improve notification (#8835) 2019-11-12 16:33:34 +08:00
v109.go Team permission to create repository in organization (#8312) 2019-11-20 19:27:49 +08:00
v110.go Change review content column to type text in db (#9229) 2019-12-02 13:32:40 -05:00
v111.go Issue with Migration rule v111 (#9449) 2019-12-21 11:12:39 +01:00
v112.go fix wrong migration (#9381) 2019-12-17 14:58:30 +08:00
v113.go Change target branch for pull request (#6488) 2019-12-16 14:20:25 +08:00
v114.go Add migration to sanitize repository original_url (#9423) 2019-12-19 17:49:48 +08:00
v115.go Ignore empty avatars in v115.go (#9520) 2019-12-28 00:57:37 +02:00
v116.go [API] Extend times API (#9200) 2019-12-27 20:30:58 +00:00
v117.go Add branch protection option to block merge on requested changes. (#9592) 2020-01-03 19:47:09 +02:00
v118.go Mark PR reviews as stale at push and allow to dismiss stale approvals (#9532) 2020-01-09 01:47:45 +00:00
v119.go Fix wrong original git service type on a migrated repository (#9693) 2020-01-10 23:35:17 +08:00
v120.go Add owner_name column for table repository for maintaince reason (#9717) 2020-01-12 17:36:21 +08:00
v121.go Restricted users (#6274) 2020-01-13 18:33:46 +01:00