mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-14 20:30:25 +08:00
访问控制支持基本认证和子请求认证
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyPopup
|
||||
|
||||
this.type = this.policy.type
|
||||
this.authDescription = ""
|
||||
|
||||
this.$delay(function () {
|
||||
this.changeType()
|
||||
})
|
||||
|
||||
this.changeType = function () {
|
||||
let that = this
|
||||
let authType = this.authTypes.$find(function (k, v) {
|
||||
return v.code == that.type
|
||||
})
|
||||
if (authType != null) {
|
||||
this.policy.typeName = authType.name
|
||||
this.authDescription = authType.description
|
||||
} else {
|
||||
this.authDescription = ""
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 基本认证
|
||||
*/
|
||||
this.moreBasicAuthOptionsVisible = false
|
||||
|
||||
this.showMoreBasicAuthOptions = function () {
|
||||
this.moreBasicAuthOptionsVisible = !this.moreBasicAuthOptionsVisible
|
||||
}
|
||||
|
||||
/**
|
||||
* 子请求
|
||||
*/
|
||||
this.subRequestFollowRequest = (this.policy.params.method != null && this.policy.params.method.length > 0) ? 0 : 1
|
||||
})
|
||||
Reference in New Issue
Block a user