aboutsummaryrefslogtreecommitdiffstats
path: root/modules/structs/user.go
Commit message (Collapse)AuthorAgeFilesLines
* Add API for changing Avatars (#25369)JakobDev2023-06-291-0/+6
| | | | | | | | | | | | This adds an API for uploading and Deleting Avatars for of Users, Repos and Organisations. I'm not sure, if this should also be added to the Admin API. Resolves #25344 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* add user rename endpoint to admin api (#22789)techknowlogick2023-03-141-0/+9
| | | | | | | | | | | | this is a simple endpoint that adds the ability to rename users to the admin API. Note: this is not in a mergeable state. It would be better if this was handled by a PATCH/POST to the /api/v1/admin/users/{username} endpoint and the username is modified. --------- Co-authored-by: Jason Song <i@wolfogre.com>
* Implement FSFE REUSE for golang files (#21840)flynnnnnnnnnn2022-11-271-2/+1
| | | | | | | | | Change all license headers to comply with REUSE specification. Fix #16132 Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Include login_name in adminCreateUser response (#20283)Baekjun Kim2022-07-151-0/+3
| | | | `login_name` (Authentication Sign-in Name) is not included in the response of `adminUserCreate` API. This PR is to return user-specified `login_name` if there is one.
* Add an abstract json layout to make it's easier to change json library (#16528)Lunny Xiao2021-07-241-2/+1
| | | | | | | | | | | * Add an abstract json layout to make it's easier to change json library * Fix import * Fix import sequence * Fix blank lines * Fix blank lines
* Add Visible modes function from Organisation to Users too (#16069)Sergey Dryabzhinsky2021-06-261-0/+2
| | | | | | | | | | | | | | | | | | You can limit or hide organisations. This pull make it also posible for users - new strings to translte - add checkbox to user profile form - add checkbox to admin user.edit form - filter explore page user search - filter api admin and public user searches - allow admins view "hidden" users - add app option DEFAULT_USER_VISIBILITY - rewrite many files to use Visibility field - check for teams intersection - fix context output - right fake 404 if not visible Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Andrew Thornton <art27@cantab.net>
* [API] GET / SET User Settings (#16169)65432021-06-231-0/+30
| | | | | | | | | | | | | | | | | | | | * API: GET/SET User Settings * linter * Apply suggestions from code review * Update modules/structs/user.go * lint * fix swagger * move User2UserSettings to convert * as per @zeripath "preferences" -> "settings" Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* [API] User expose counters (#16167)65432021-06-171-0/+5
|
* Add Active and ProhibitLogin to API (#15689)KN4CK3R2021-05-111-0/+4
| | | | | * Added active and prohibit_login. * Do not omit fields for normal users.
* Addition to (Add Location, Website and Description to API #15675) (#15690)KN4CK3R2021-05-021-2/+2
| | | | | | | | | * Use same name as other structs. * Sync with normal forms. * Edit description with API. * Workaround for nil value.
* Add Location, Website and Biography to API (#15675)KN4CK3R2021-05-011-0/+6
|
* Migrate to use jsoniter instead of encoding/json (#14841)zeripath2021-03-011-1/+3
| | | | | | | | | | * Migrate to use jsoniter * fix tests * update gitea.com/go-chi/binding Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* [API] Add Restricted Field to User (#14630)65432021-02-181-0/+2
| | | | | | | | | | | | * Expose Restricted field for User * Add Option to Change Restricted on User via adminEditUser API * Add test who change restricted & test if it changed it ... * make generate-swagger Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add LastLogin to the User API (#7196)zeripath2019-06-151-0/+5
|
* Move sdk structs to modules/structs (#6905)Lunny Xiao2019-05-111-0/+38
* move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor