56 Commits

Author SHA1 Message Date
ferhat elmas 670aa32325 refactor(lint): add new linters and fix their issues
* gocritic
* misspell
* modernize (aside, bumping go would be nice)
* testifylint
* unconvert
* unparam
* whitespace

related to #1432

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
2025-12-05 10:45:55 +08:00
LinkinStars b78be61ee8 refactor(user): simplify suspended until logic 2025-06-26 16:42:24 +08:00
LinkinStars 6d02706d4d feat(user): add user suspension functionality 2025-06-26 14:42:08 +08:00
DanielAuerX def0559a55 Fix file record and delete files (branding and avatar) (#1335)
- [x] create file_record table
- [x] avatar and branding files are added to file_record
- [x] branding files are being deleted
- [x] avatar files are being deleted
- [x] reload latest avatar (frontend) after backend state is being
updated

problems addressed in the pr:
- clean up job fails, because it cannot access file_record table
- avatar and branding files are not added to the file_record table
- avatar and branding files are never deleted
- after an avatar is being updated/deleted, the old file is still being
requested due to browser caching. This is causing error logs ("no such
file or directory") in the backend.

cf. conversation in [pr
1326](https://github.com/apache/answer/pull/1326)

---------

Co-authored-by: broccoli <lekker.broccoli@gmail.com>
Co-authored-by: LinkinStars <linkinstar@foxmail.com>
2025-05-23 15:07:14 +08:00
LinkinStars 47c666200e Merge remote-tracking branch 'origin/main' into dev
# Conflicts:
#	internal/base/middleware/accept_language.go
#	internal/schema/answer_schema.go
#	internal/schema/comment_schema.go
#	internal/service/user_admin/user_backyard.go
2025-01-07 12:48:13 +08:00
LinkinStars 0618947350 refactor(name): rename incubator-answer 2025-01-07 10:39:23 +08:00
LinkinStars 57b153c9a9 feat(user): add FilterEmptyString function and apply to user ID filtering 2024-12-25 16:00:08 +08:00
Luffy d91e3c20d2 fix: get user info error 2024-12-25 15:53:04 +08:00
LinkinStars 6817fafcca refactor(gomod): replace pinyin dependency 2024-09-26 16:25:40 +08:00
sy-records 659a3383c9 fix: GetUserIsAdminModerator failed 2024-09-19 14:48:35 +08:00
sy-records 2133e0fb4f feat: Support admin edit profie 2024-06-12 11:44:34 +08:00
LinkinStars 7d75f2fa97 feat(user): add the API for get staff 2024-04-26 10:26:40 +08:00
LinkinStars 937de43978 Release/1.2.5 (#759)
Signed-off-by: Adam Vollrath <adam.d.vollrath@gmail.com>
Co-authored-by: shuai <lishuailing@sifou.com>
Co-authored-by: kelvinkuo <kelvinkuo224@gmail.com>
Co-authored-by: hgaol <dhangao@hotmail.com>
Co-authored-by: sy-records <52o@qq52o.cn>
Co-authored-by: Adam Vollrath <adam.d.vollrath@gmail.com>
Co-authored-by: kumfo <kumfo@sifou.com>
Co-authored-by: Yang Wong <yang wang>
Co-authored-by: hbsciw <hbsciw@gmail.com>
2024-01-29 17:19:41 +08:00
LinkinStars a458f3409c rename all old answerdev/answer link to apache/incubator-answer (#603)
Co-authored-by: shuai <lishuailing@sifou.com>
2023-11-01 14:48:35 +08:00
tison 3d2187d849 chore: add license headers
Signed-off-by: tison <wander4096@gmail.com>
2023-10-26 11:11:23 +08:00
LinkinStars c2b4a49dc0 feat(visit): only login user can access upload file in private mode. 2023-10-10 16:23:10 +08:00
LinkinStars da0bc8b76d feat(user): change delete user display info 2023-09-22 11:47:05 +08:00
LinkinStars 99a61fcf7c feat(user): anonymising notifications of deleted users 2023-09-13 14:36:08 +08:00
LinkinStars b38f2e4345 feat(user): remove all the content when delete user 2023-09-12 18:56:52 +08:00
LinkinStars 0bd540661c fix(search): fix incorrect tags when search 2023-08-30 17:41:44 +08:00
LinkinStars 65eb0daa85 feat(user): update user status 2023-08-04 15:48:20 +08:00
LinkinStars 69f250ee04 feat(user): replace space in username with - 2023-07-06 16:18:57 +08:00
LinkinStars b01d965f80 refactor(user): refactor search user by name 2023-07-04 11:20:55 +08:00
LinkinStars 1c2151d710 refactor(shortid): remove short id variable 2023-06-02 16:53:49 +08:00
LinkinStars fb412cb417 refactor(avatar): remove all avatar global variables config 2023-05-29 14:58:58 +08:00
aichy126 144caea4f9 update invite user 2023-05-23 14:54:59 +08:00
aichy126 80b6b786c5 update inviteUser 2023-05-23 12:15:52 +08:00
aichy126 bbf7849fb7 update invite 2023-05-22 18:42:28 +08:00
aichy126 2da05f155c Merge branch 'beta.2/1.1.0' into feat/1.1.0/sql 2023-05-16 16:08:03 +08:00
aichy126 299b95b2f2 update user question count 2023-05-16 16:02:41 +08:00
LinkinStars 8800b376d5 feat(privilege): add privileges API 2023-04-17 18:04:28 +08:00
LinkinStars 28e9916468 refactor(merge): merge 1.0.7 2023-03-21 11:53:15 +08:00
LinkinStars 9bd9b475f4 Merge branch 'feat/ui-1.1.0' into feature-plugin
# Conflicts:
#	internal/base/reason/reason.go
#	internal/schema/user_schema.go
#	internal/service/user_service.go
2023-03-21 11:45:50 +08:00
LinkinStars 8c871f1399 feat(avatar): Set default user avatar by config 2023-03-02 17:28:48 +08:00
LinkinStar 6a8d5e5984 Merge branch 'feat/1.0.4/comment' into feat/plugin/connector/github
# Conflicts:
#	internal/migrations/migrations.go
#	internal/migrations/v6.go
#	internal/service/user_common/user.go
#	internal/service/user_service.go
#	pkg/checker/reserved_username.go
#	ui/build/index.html
2023-02-01 17:02:00 +08:00
LinkinStar d355c823c3 fix(user): Add rules to restrict username during installation. fix #181 2023-01-28 10:40:01 +08:00
LinkinStar 06db2bd091 feat(plugin): The third-party login send binding email 2023-01-09 16:54:20 +08:00
LinkinStar 81d786ff66 feat(plugin): add user external login service 2023-01-06 14:34:53 +08:00
LinkinStar 427753a161 feat(user): user can't use reserved username 2022-12-28 17:12:20 +08:00
LinkinStar 42756c0742 feat(user): backend add user and change user password 2022-12-07 10:26:02 +08:00
LinkinStar 210c5c6a8e feat(role): add role permission 2022-12-02 11:21:24 +08:00
LinkinStar affd376f57 Merge branch 'dev' into feat/0.6.0/user-role 2022-12-01 18:23:56 +08:00
LinkinStar 6a9408657c feat(user): add role and role power 2022-12-01 15:54:06 +08:00
LinkinStar 59a8b0f3bb feat: check rank permission 2022-11-24 16:11:43 +08:00
linkinstar 436ce151bc Merge branch 'ai_0.3_dashboard' into 'test'
Ai 0.3 dashboard

See merge request opensource/answer!163
2022-11-02 08:50:38 +00:00
aichy126 e84a681ce4 add dashboard info 2022-11-02 16:29:10 +08:00
LinkinStar 720754c8bb feat: support to config the default language 2022-11-02 15:25:27 +08:00
LinkinStar cec446047d Merge branch 'main' into feat/repo-unit-test
# Conflicts:
#	cmd/answer/wire_gen.go
#	go.mod
#	go.sum
#	internal/controller/user_controller.go
#	internal/repo/notification/notification_repo.go
#	internal/repo/revision/revision_repo.go
#	internal/repo/tag/tag_rel_repo.go
#	internal/repo/tag/tag_repo.go
#	internal/schema/user_schema.go
2022-11-01 16:17:03 +08:00
LinkinStar 6e5d89d593 Merge branch 'github-main'
# Conflicts:
#	go.mod
#	internal/entity/answer_entity.go
#	internal/schema/question_schema.go
#	internal/service/user_service.go
2022-11-01 15:37:22 +08:00
Tai Groot 59e2e1f304 Running gofumpt against repo (#49)
* starting on gofumpt

* continuing on gofumpt

* continuing on gofumpt

* finish gofumpt review

* added changes requested by LinkinStars' review

Co-authored-by: LinkinStars <linkinstar@foxmail.com>
2022-11-01 15:25:44 +08:00