feat(auth): 登录注册 - 添加短信通知与组合验证支持
This commit is contained in:
1 parent
6c013ebf7e
commit
bc0d109428
55 files changed
+4013
-103
No files matched your search
@@ -23,6 +23,7 @@ const (
|
||||
PluginKindProtocol = "protocol"
|
||||
PluginKindApplication = "application"
|
||||
PluginKindPayment = "payment"
|
||||
PluginKindSMS = "sms"
|
||||
|
||||
PluginScopeSystem = "system"
|
||||
PluginScopeUser = "user"
|
||||
@@ -112,6 +113,9 @@ func pluginManagement(pluginID string, source string) PluginManagementView {
|
||||
if policy, ok := systemPaymentPolicies[strings.TrimSpace(pluginID)]; ok {
|
||||
return policy
|
||||
}
|
||||
if policy, ok := systemSMSPolicies[strings.TrimSpace(pluginID)]; ok {
|
||||
return policy
|
||||
}
|
||||
return PluginManagementView{
|
||||
Origin: PluginOriginOfficial, Kind: PluginKindProtocol,
|
||||
ActivationScope: PluginScopeSystem, ConfigurationScope: PluginConfigurationSystem,
|
||||
@@ -147,6 +151,10 @@ func knownPluginIDs(items []PluginView) []string {
|
||||
seen[id] = struct{}{}
|
||||
ids = append(ids, id)
|
||||
}
|
||||
for id := range systemSMSPolicies {
|
||||
seen[id] = struct{}{}
|
||||
ids = append(ids, id)
|
||||
}
|
||||
for _, item := range items {
|
||||
if _, exists := seen[item.Manifest.ID]; exists {
|
||||
continue
|
||||
@@ -338,6 +346,9 @@ func (s *Service) SetPluginPlatformAvailability(actor *model.User, pluginID stri
|
||||
}
|
||||
|
||||
func isKnownRuntimeOptionalPlugin(pluginID string) bool {
|
||||
if isSystemSMSPluginID(pluginID) {
|
||||
return true
|
||||
}
|
||||
if _, known := officialApplicationPolicies[pluginID]; known {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user