Commit Graph

19 Commits (65b6ebf24392efd30b087b33d9666fbaa821f2a2)

Author SHA1 Message Date
Lunny Xiao b1f3685015 fix approvals limitation ()
Jonas Franz 9681c83734 Approvals at Branch Protection ()
* Add branch protection for approvals

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add required approvals

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add missing comments and fmt

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add type = approval and group by reviewer_id to review

* Prevent users from adding negative review limits

* Add migration for approval whitelists

Signed-off-by: Jonas Franz <info@jonasfranz.software>
Lunny Xiao eabbddcd98
Restrict permission check on repositories and fix some problems ()
* fix units permission problems

* fix some bugs and merge LoadUnits to repoAssignment

* refactor permission struct and add some copyright heads

* remove unused codes

* fix routes units check

* improve permission check

* add unit tests for permission

* fix typo

* fix tests

* fix some routes

* fix api permission check

* improve permission check

* fix some permission check

* fix tests

* fix tests

* improve some permission check

* fix some permission check

* refactor AccessLevel

* fix bug

* fix tests

* fix tests

* fix tests

* fix AccessLevel

* rename CanAccess

* fix tests

* fix comment

* fix bug

* add missing unit for test repos

* fix bug

* rename some functions

* fix routes check
SagePtr 32145b6de8 Push whitelist now doesn't apply to branch deletion () ()
SagePtr c1224124ea Fix incorrect MergeWhitelistTeamIDs check in CanUserMerge function () ()
Chri-s 9350ba7947 Add protected branch whitelists for merging ()
* Add database migrations for merge whitelist

* Add merge whitelist settings for protected branches

* Add checks for merge whitelists
Wendell Sun d2d0aea8a1 Fix the protected branch panic issue ()
Wendell Sun 19bf4ddf80 Fix query protected branch bug ()
Signed-off-by: Wendell Sun <iwendellsun@gmail.com>
Lunny Xiao f2e20c81b6 Refactor struct's time to remove unnecessary memory usage ()
* refactor struct's time to remove unnecessary memory usage

* use AsTimePtr simple code

* fix tests

* fix time compare

* fix template on gpg

* use AddDuration instead of Add
Bwko 3ab580c8d6 Add branch overiew page ()
* Add branch overiew page

* fix changed method name on sub menu

* remove unused code
Ethan Koenig aa962deec0 Replace deprecated Id method with ID ()
Lauris BH 6718ea6ff1 Fix can_push value to false in protected_branch ()
Lunny Xiao 1739e84ac0 improve protected branch to add whitelist support ()
* improve protected branch to add whitelist support

* fix lint

* fix style check

* fix tests

* fix description on UI and import

* fix test

* bug fixed

* fix tests and languages

* move isSliceInt64Eq to util pkg; improve function names & typo
Lunny Xiao 005900baea Use created & updated instead BeforeInsert & BeforeUpdate ()
* use created & updated instead BeforeInsert & BeforeUpdate

* fix vendor checksum

* only show generated SQL when development mode

* remove extra update column updated_unix

* remove trace config
Lauris BH 6db387a21e Refactor session close as xorm already does everything needed internally ()
Lauris BH 0144817971 Do not allow commiting to protected branch from online editor ()
* Do not allow commiting to protected branch from online editor

* Add editor integration tests for adding new file and not allowing to add new file to protected branch
Ethan Koenig 021904e4e6 Fix typos in models/ and modules/ ()
Lunny Xiao e4134debd1 Remove unused vars ()
* remove unused vars

* remove unused comment
Denis Denisov fd941db246 Protected branches system ()
* Protected branches system

* Moved default branch to branches section (`:org/:reponame/settings/branches`).
* Initial support Protected Branch.
  - Admin does not restrict
  - Owner not to limit
  - To write permission restrictions

* reformat tmpl

* finished the UI and add/delete protected branch response

* remove unused comment

* indent all the template files and remove ru translations since we use crowdin

* fix the push bug