]> source.dussan.org Git - gitea.git/commit
Prevent addition of labels from outside the repository or organisation in issues...
authorzeripath <art27@cantab.net>
Fri, 19 Mar 2021 13:25:14 +0000 (13:25 +0000)
committerGitHub <noreply@github.com>
Fri, 19 Mar 2021 13:25:14 +0000 (21:25 +0800)
commitdace0ce1b191d060976bac08f181ca768fc027a0
tree6258fb4991c3ce80c1d188f76d8d561e859e442a
parent54d7b0f8e737cda864af981b29dda5116fc5f9ca
Prevent addition of labels from outside the repository or organisation in issues (#14912)

* Never add labels not from this repository or organisation and remove org labels on transfer

Prevent the addition of labels from outside of the repository or
organisation and remove organisation labels on transfer.

Related #14908

Signed-off-by: Andrew Thornton <art27@cantab.net>
* switch to use sql

Signed-off-by: Andrew Thornton <art27@cantab.net>
* remove AS

Signed-off-by: Andrew Thornton <art27@cantab.net>
* subquery alias

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Give me some AS?

Signed-off-by: Andrew Thornton <art27@cantab.net>
* double AS

Signed-off-by: Andrew Thornton <art27@cantab.net>
* try try again

Signed-off-by: Andrew Thornton <art27@cantab.net>
* once more around the merry go round

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix api problem

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add outside label consistency check into doctor

This PR adds another consistency check into doctor in order to detect
labels that have been added from outside of repositories and organisations

Fix #14908

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix migration

Signed-off-by: Andrew Thornton <art27@cantab.net>
* prep for merge

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
models/consistency.go
models/migrations/migrations.go
models/migrations/v176.go [new file with mode: 0644]
modules/doctor/dbconsistency.go