Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AdminLogin API #305

Merged
merged 2 commits into from Oct 21, 2018
Merged

Add AdminLogin API #305

merged 2 commits into from Oct 21, 2018

Conversation

freedomkk-qfeng
Copy link
Member

增加了一个 AdminLogin 的 API
以支持 dashboard 上的的第三方认证。(即 API 直接信任 dashboard 第三方认证的结果)

通过 Apitoken 授权,需要用至少管理员以上的账号起请求 Apitoken

如果请求认证的账号的也是管理员账号,则用于获取 Apitoken 的账号需要是 root

顺带把 no such user 的判断条件改为了

case user.ID == 0:

因为之前已经声明过了

	user := uic.User{
		Name: name,
	}

所以通过 user.Name == "" 不可能命中条件的

Copy link
Member

@laiwei laiwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@laiwei laiwei merged commit a09a081 into open-falcon:master Oct 21, 2018
@laiwei
Copy link
Member

laiwei commented Oct 21, 2018

related doc: https://www.jianshu.com/p/8e9d9978f596

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants