mirror of
https://github.com/discourse/discourse.git
synced 2025-09-11 21:04:42 +08:00
Support for per-user API keys
This commit is contained in:
parent
5e2d8dcf37
commit
348e2e3ef2
45 changed files with 670 additions and 87 deletions
|
@ -279,7 +279,7 @@ class ApplicationController < ActionController::Base
|
|||
protected
|
||||
|
||||
def api_key_valid?
|
||||
request["api_key"] && SiteSetting.api_key_valid?(request["api_key"])
|
||||
request["api_key"] && ApiKey.where(key: request["api_key"]).exists?
|
||||
end
|
||||
|
||||
# returns an array of integers given a param key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue