35 Commits (a1c9e8f266cb2809200dce1618da33314cc25082)

Author SHA1 Message Date
6543 325add71cf
Add option for administrator to reset user 2FA (#14243)
* Frontend

* Backend

* only show 2FA-Reset option if posible
4 years ago
zeripath 217647f331
Multiple small admin dashboard fixes (#12153)
* 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 #12107 - redirects from process cancel should use AppSubUrl
* When wrapping queues set the name correctly

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago
zeripath 9a2e47b23a
Refactor Cron and merge dashboard tasks (#10745)
* 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>
4 years ago
John Olheiser e5944a9521
Change admin dashboard to POST (#10465)
* Add form and convert to POST

* Redirect for flash

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years ago
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>
5 years ago
Tamal Saha 171b359877 Use gitea forked macaron (#7933)
Signed-off-by: Tamal Saha <tamal@appscode.com>
5 years ago
Segev Finer 594f591691 Increase Username and Orgname MaxSize 35 -> 40 (#6178)
* 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>
5 years ago
Lanre Adelowo 2a6d3ba058 Allow admin toggle forcing a password change for newly created users (#4563) 6 years ago
Lauris BH f42ec6120e Better URL validation (#1507)
* 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
7 years ago
Bwko 634ac9c5af Update Website binding MaxSize to 255 (#722) 8 years ago
Schwobaland c0904f1942 Restrict creating organisations by user (#193)
* 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
8 years ago
Lunny Xiao ec87a75c00 golint fixed for modules/auth 8 years ago
Unknwon c083d76567 #2937 able to prohibit user login 8 years ago
Unknwon 2a0bb1fa90 #1575 Limit repo creation 9 years ago
Unknwon 6f0a41b8b2 #1511 Allow local import only for admin users 9 years ago
Unknwon 932dbccb67 fix import path, fix #1782 9 years ago
Unknwon 21e13cb51e #1525 Triggere mailer for admin created accounts 9 years ago
Unknwon 83e747bfda #697 and #1606 and new admin edit user UI 9 years ago
Unknwon 07fe846c9f #1579 change e-mail max length to 254 9 years ago
James f3aab5dbe3 Add full name field to admin's user edit page (fixes #1130) 9 years ago
Unknwon 33894591a6 #851: Edit Account does not take into consideration password rules 9 years ago
Unknwon 32dcaefafa fox #620 10 years ago
Unknwon fa241efa6d Use binding middleware 10 years ago
Unknwon 8829174574 Finish new admin users pages 10 years ago
Unknwon 8dd07c0ddd New UI merge in progress 10 years ago
gima 5a97cc69ed Make possible for administrators to change user's password (fix proposal for #290) 10 years ago
Unknown 09dba7d63e Clean names 10 years ago
Unknown 6e3dba2cc5 Clean repo code 10 years ago
Unknown 3b7465f817 fix code 10 years ago
Lunny Xiao d8136c9c3c Merge branch 'dev-ldap' into dev 10 years ago
Lunny Xiao 1652dd5068 basic authentications 10 years ago
Unknown 816c0ed5e7 Fix import path 10 years ago
Unknown 5c2da610a2 Move binding as subrepo 10 years ago
Unknown d0e6a4c25a Change new martini impot path 10 years ago
Unknown 30618b271a Add admin edit user 10 years ago