Commit Graph

34 Commits (979fbe086cd2e9aef83b44a92f23b970b8897eaf)

Author SHA1 Message Date
zeripath 217647f331
Multiple small admin dashboard fixes ()
* Remove spurious spacing between Maintenance Operations and its table on dashboard
* Prevent (EXTRA string) comments in Task headers
* Redirect tasks started from monitor page back to monitor
* Fix  - redirects from process cancel should use AppSubUrl
* When wrapping queues set the name correctly

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath 9a2e47b23a
Refactor Cron and merge dashboard tasks ()
* Refactor Cron and merge dashboard tasks

* Merge Cron and Dashboard tasks
* Make every cron task report a system notice on completion
* Refactor the creation of these tasks
* Ensure that execution counts of tasks is correct
* Allow cron tasks to be started from the cron page

* golangci-lint fixes

* Enforce that only one task with the same name can be registered

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

* fix name check

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

* as per @guillep2k

* as per @lafriks

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

* Add git.CommandContext variants

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

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
John Olheiser e5944a9521
Change admin dashboard to POST ()
* Add form and convert to POST

* Redirect for flash

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Manush Dodunekov 1751d5fcf2 Restricted users ()
* Restricted users (): 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>
Tamal Saha 171b359877 Use gitea forked macaron ()
Signed-off-by: Tamal Saha <tamal@appscode.com>
Segev Finer 594f591691 Increase Username and Orgname MaxSize 35 -> 40 ()
* Increase Username and Orgname MaxSize 35 -> 40

Signed-off-by: Segev Finer <segev@codeocean.com>

* Dep update code.gitea.io/sdk

Signed-off-by: Segev Finer <segev@codeocean.com>

* Run generate-swagger

Signed-off-by: Segev Finer <segev@codeocean.com>
Lanre Adelowo 2a6d3ba058 Allow admin toggle forcing a password change for newly created users ()
Lauris BH f42ec6120e Better URL validation ()
* Add correct git branch name validation

* Change git refname validation error constant name

* Implement URL validation based on GoLang url.Parse method

* Backward compatibility with older Go compiler

* Add git reference name validation unit tests

* Remove unused variable in unit test

* Implement URL validation based on GoLang url.Parse method

* Backward compatibility with older Go compiler

* Add url validation unit tests
Bwko 634ac9c5af Update Website binding MaxSize to 255 ()
Schwobaland c0904f1942 Restrict creating organisations by user ()
* restrict creating organizations based on right on user

* revert bindata.go

* reverse vendor lib

* revert goimports change

* set AllowCreateOrganization default value to true

* revert locale

* added default value for AllowCreateOrganization

* fix typo in migration-comment

* fix comment

* add coments in migration
Lunny Xiao ec87a75c00 golint fixed for modules/auth
Unknwon c083d76567 able to prohibit user login
Unknwon 2a0bb1fa90 Limit repo creation
Unknwon 6f0a41b8b2 Allow local import only for admin users
Unknwon 932dbccb67 fix import path, fix
Unknwon 21e13cb51e Triggere mailer for admin created accounts
Unknwon 83e747bfda and and new admin edit user UI
Unknwon 07fe846c9f change e-mail max length to 254
James f3aab5dbe3 Add full name field to admin's user edit page (fixes )
Unknwon 33894591a6 : Edit Account does not take into consideration password rules
Unknwon 32dcaefafa fox
Unknwon fa241efa6d Use binding middleware
Unknwon 8829174574 Finish new admin users pages
Unknwon 8dd07c0ddd New UI merge in progress
gima 5a97cc69ed Make possible for administrators to change user's password (fix proposal for )
Unknown 09dba7d63e Clean names
Unknown 6e3dba2cc5 Clean repo code
Unknown 3b7465f817 fix code
Lunny Xiao d8136c9c3c Merge branch 'dev-ldap' into dev
Lunny Xiao 1652dd5068 basic authentications
Unknown 816c0ed5e7 Fix import path
Unknown 5c2da610a2 Move binding as subrepo
Unknown d0e6a4c25a Change new martini impot path
Unknown 30618b271a Add admin edit user