832 Commits

Author SHA1 Message Date
Mr Forest
27bd771fed
feat: handle the dataSourceName when DB changes (#1352)
* fix: handle the dataSourceName when DB changes

* reduce duplication of code
2022-12-02 22:20:18 +08:00
WangGuan
b895926754
feat: use another filename when uploading a duplicated file instead of replacing it (#1329)
* fix: upload a file with the same name, not replace

* Update resource.go

Co-authored-by: hsluoyz <hsluoyz@qq.com>
2022-11-27 17:32:15 +08:00
Yaodong Yu
b10fb97c92
feat: finish policy list management (#1317) 2022-11-25 16:02:20 +08:00
Yaodong Yu
b337b908ea
feat: fix the bug that admin cannot upload avatar for other users (#1323) 2022-11-25 09:36:47 +08:00
Mr Forest
84a03f6c8e
feat: add webhook for add/update org/provider (#1316) 2022-11-24 00:29:15 +08:00
会思考的下丘脑
56ff06bbea
feat: add parameter v0 for Casbin APIs (#1315) 2022-11-23 22:39:17 +08:00
Yaodong Yu
7e756b8ee2
feat: manager applications in organization scope (#1290)
* feat: manager applications in organization scope(front end)

* fix: application can use own organization and admin provider

* fix: improve methed to get provider

* fix: modify provider methods by convention
2022-11-21 01:17:55 +08:00
Yaodong Yu
19ba37e0c2
feat: can specify available UI languages for an organization (#1306) 2022-11-19 22:11:19 +08:00
Mr Forest
b98ce19211
feat: fix bug in GetDefaultApplication() that caused login error for other orgs (#1299)
* fix:fix bug in GetDefaultApplication

* fix:fix bug in GetDefaultApplication
2022-11-16 00:39:05 +08:00
imp2002
f115843fbb
feat: fix verification code send time's limit logic (#1292) 2022-11-13 22:00:48 +08:00
Mr Forest
aa6a4dc74f
feat: support login by following wechat official account (#1284)
* show QRcode when click WeChat Icon

* update how to show qrcode

* handle wechat scan qrcode

* fix api problems

* fix url problems

* fix problems

* modify get frequency

* remove useless print

* fix:fix PR problems

* fix: fix PR problems

* fix:fix PR problem

* fix IMG load delay problems

* fix:fix provider problems

* fix test problems

* use gofumpt to fmt code

* fix:delete useless variables

* feat:add button for follow official account

* fix:fix review problems

* use gofumpt to fmt code

* fix:fix scantype problems

* fix Response problem

* use gofumpt to format code
2022-11-13 15:05:15 +08:00
cofecatt
462a82a3d5
fix: Add distinctions between access_token and refresh_token (#1280) 2022-11-13 13:00:25 +08:00
cofecatt
770ae47471
feat: fix memory leak problem (#1257) 2022-11-06 01:43:27 +08:00
Yaodong Yu
8d686411ee
feat: support add providers inside the Organization scope (#1250)
* feat: support add providers inside the Organization scope

Signed-off-by: magicwind <2814461814@qq.com>

* Update ProviderListPage.js

* fix: gloabal admin can see all providers

* fix: table fixed column warning

* fix: edit application page can get all providers

Signed-off-by: magicwind <2814461814@qq.com>
Co-authored-by: hsluoyz <hsluoyz@qq.com>
2022-11-04 21:31:08 +08:00
Yaodong Yu
ce722897f1
feat: support prefix path for storage files (#1258) 2022-11-04 21:08:39 +08:00
Mr Forest
a8381e875b
feat: change all occurrences when a object name is changed (#1252) 2022-11-02 00:17:38 +08:00
Ke Wang
4c81fd7d16
feat: fix generating wrong x.509 private key file header (#1253)
According to the [official x509 documentation](https://pkg.go.dev/crypto/x509#MarshalPKCS1PrivateKey), the private key generated using `x509.MarshalPKCS1PrivateKey` starts with `-----BEGIN RSA PRIVATE KEY-----` instead of `-----BEGIN PRIVATE KEY-----`. Otherwise, it will not be parsed by most tools (like OpenSSL, [jwt.io](https://jwt.io/), etc.) because it does not conform to the specification.
2022-11-01 22:19:38 +08:00
Bingchang Chen
9d5b019243
fix: nil error if init data is empty (#1247) 2022-10-29 20:04:43 +08:00
wenxuan70
25d56ee8d5
feat: allow captcha to be enabled when logging in (#1211)
* Fix bug in GetAcceptLanguage()

* feat: allow captcha to be enabled when logging in

* feat: when the login password is wrong, enable captcha

* feat: Restrict captcha from frontend

* fix: modify CaptchaModal component

* fix: modify the words of i18n

* Update data.json

Co-authored-by: Gucheng Wang <nomeguy@qq.com>
Co-authored-by: hsluoyz <hsluoyz@qq.com>
2022-10-28 13:38:14 +08:00
Mr Forest
d86f3c88c7
feat: support i18n in backend err messages (#1232)
* feat: support i18n in backend err messages

* use gofumpt to fmt code

* fix review problems

* support auto generate err message

* delete beego/i18n moudle

* fix Github action test problems

* fix review problems

* use gofumpt to format code

* use gofumpt to fmt code
2022-10-23 15:16:24 +08:00
Yaodong Yu
b0f572c51a
feat: add left-side image and improve login page (#1226) 2022-10-22 21:43:41 +08:00
cofecatt
19d351d157
feat: allow non-ASCII characters in username (#1235) 2022-10-22 20:46:50 +08:00
Yaodong Yu
6a1ec51978
feat: fix SSRF when download avatar (#1193) 2022-10-20 14:47:08 +08:00
Gucheng
146aec9ee8
feat: skip username restriction for new users coming from OAuth providers. (#1225) 2022-10-17 18:01:01 +08:00
Mr Forest
50a52de856
feat: support database version control (#1221)
* feat: support Database version control

* Update adapter.go

* fix review problems

* Update adapter.go

Co-authored-by: Yang Luo <hsluoyz@qq.com>
2022-10-15 17:20:20 +08:00
cofecatt
23f3fe1e3c
feat: update code format (#1214)
* feat: doc

* feat: doc

* Update model.go

Co-authored-by: Gucheng <85475922+nomeguy@users.noreply.github.com>
2022-10-12 11:42:14 +08:00
cofecatt
59ff5e02ab
fix: Add support for including underscores for username (#1210)
* fix: Add support for including underscores for username

* Update check.go

Co-authored-by: Yang Luo <hsluoyz@qq.com>
2022-10-11 19:39:19 +08:00
cofecatt
4c7f6fda37
fix: Add restriction to username when signing up (#1203) 2022-10-10 19:58:02 +08:00
Gucheng Wang
44ad88353f Add error to GetDefaultApplication() 2022-10-09 10:39:33 +08:00
q1anx1
645c631db9
fix: fix the delete file vulnerability issue (#1174) 2022-10-01 00:33:27 +08:00
Gucheng Wang
04709f731b Update beego to v1.12.11 2022-09-29 19:45:17 +08:00
WangGuan
ceabbe27b4
feat: remove p_type in table permission_rule (#1165) 2022-09-27 22:50:27 +08:00
Gucheng Wang
7393b90155 Add enableAutoSignin to application 2022-09-27 20:06:46 +08:00
Yang Luo
116420adb2
feat: revert "feat: fix openid address format" (#1158)
This reverts commit a447d64bf217d260eb28d7112c167549467cc9c2.
2022-09-25 09:58:45 +08:00
Mr Forest
07c1e3b836
feat: support simple LDAP server (#1155)
* feat:Support simple ldap server

* fix:fix review problems

* fix:fix review problems
2022-09-24 21:48:29 +08:00
Taoning Ge
a447d64bf2
fix: openid address format (#1157) 2022-09-24 15:34:11 +08:00
Gucheng Wang
575a248c41 Add TestGetEmailsForUsers() 2022-09-22 20:51:50 +08:00
Gucheng Wang
084a5c3e6b Show logs to org admin 2022-09-18 16:16:45 +08:00
Gucheng Wang
e1331f314d Add RequireSignedInUser() 2022-09-18 15:43:49 +08:00
Yixiang Zhao
604033aa02
feat: use Casdoor to manage Casbin DB table (#1100)
* feat: use Casdoor to manage Casbin DB table

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* fix: remove trivial codes

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* chore: go fmt

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* feat: support role definition

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* fix: i18n

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* fix: i18n

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>
2022-09-14 22:14:13 +08:00
Yixiang Zhao
729c20393c
fix: missing providers and org in GetDefaultApplication (#1123)
Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>
2022-09-13 22:54:05 +08:00
Gucheng
5707e38912
feat: add batchSize to conf (#1120) 2022-09-13 20:31:22 +08:00
Yixiang Zhao
b6cdc46023
feat: add defaultApplication for Orgnization (#1111)
* feat: add defaultApplication for Orgnization

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* fix: remove redundant codes

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* fix: don't use app-built-in

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* fix: add query param

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* Update organization.go

* Update organization.go

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>
Co-authored-by: Yang Luo <hsluoyz@qq.com>
2022-09-10 20:41:45 +08:00
Gucheng Wang
c661a57cb2 Support regex in CheckRedirectUriValid() 2022-09-10 13:12:36 +08:00
tom2nonames
8456b7f7c4
fix: with error pq: column "DingTalk" of relation "user" does not exist (#1116)
* feat: add dingtalk union_id

* fix: with pg, column Dingtalk of relation user table does not exist.

* Update user_util.go

Co-authored-by: Yang Luo <hsluoyz@qq.com>
2022-09-10 13:08:37 +08:00
leoshine
1edb91b3a3
feat: custom login form and background (#1107)
* feat: custom login form and background

Signed-off-by: magicwind <2814461814@qq.com>

* feat: costom login form border

* chore: update i18

* Update ApplicationEditPage.js

* Update LoginPage.js

* Update SignupPage.js

* Update LoginPage.js

* Update ApplicationEditPage.js

Signed-off-by: magicwind <2814461814@qq.com>
Co-authored-by: Gucheng <85475922+nomeguy@users.noreply.github.com>
2022-09-10 00:56:37 +08:00
tom2nonames
6035b98653
feat: add dingtalk union_id (#1110) 2022-09-08 14:44:06 +08:00
Gucheng Wang
8128671c8c Improve email code 2022-09-04 12:15:07 +08:00
cofecatt
ee54dec3b3
feat: add support for mysubmail (#1095)
* feat: add support for mysubmail

* Update email.go

Co-authored-by: Yang Luo <hsluoyz@qq.com>
2022-09-04 12:09:50 +08:00
Gucheng Wang
d278bc9651 Add receiver for Email provider 2022-09-04 11:37:36 +08:00