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

User ACL问题请求帮助 #444

Open
xixilive opened this issue Jan 20, 2017 · 3 comments
Open

User ACL问题请求帮助 #444

xixilive opened this issue Jan 20, 2017 · 3 comments

Comments

@xixilive
Copy link

User collection级别的ACL如下:

create: 'role:admin',
delete: 'role:admin',
find: 'role:admin',
get: 'public',
update: 'public'

某row的ACL如下:

{
  objectId: '123456',
  username: 'tester',
  ACL: {
    "*": {read: true},
    "123456" {write: true},
    "role:admin": {write: true}
  }
}

已经创建并关联了admin role

通过RESTful API访问/更新用户资料时有以下问题:

  • admin 可以find
  • tester 不可以find
  • tester 可以通过自己的sessionKey修改自己

以上三条是预期的结果, 但是下面这条就不知为何了.

  • admin 无法通过自己的sessionKey修改tester

另外, 还想知道ACL规则的权重是如何计算/合并的?

@xixilive
Copy link
Author

👍

@xixilive
Copy link
Author

补充, 同样的ACL rule在其他业务model上是按照预期工作的

@leeyeh
Copy link
Contributor

leeyeh commented Jan 20, 2017

User 表与其他表不同,有一条额外的规则只允许某个 user 对应的 session update。这条规则的优先级比 Class 权限要高。(@sunchanglong 或许在控制台禁用掉 User 表 update: public 这一选项?)

当然 User 表依然可以通过 masterKey 来修改。

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

No branches or pull requests

2 participants