-
Notifications
You must be signed in to change notification settings - Fork 11
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
return group members #40
base: master
Are you sure you want to change the base?
Conversation
Azure AD の アプリケーションギャラリーで利用可能になるためには、少なくともGroups に対する GET でパラメータに「attributes=members」が指定されていたら、membersを付けて返す必要があると指摘されています。 本PRではひとまず、全てのリクエストに対して members を返す実装をしていますが、後に以下の対応をしようと考えています。 本PRではmembersの返し方が適切かを見て頂きたいです。 |
def group_object_response(object) | ||
response = find_value(object, Scimaenaga.config.group_schema.except(:members)) | ||
members_attribute = Scimaenaga.config.group_schema[:members] | ||
return if members_attribute.nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こいつがnil返すとどうなる?
テストがほしいです...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return response するのを忘れてました・・・。
テスト作成します。
find_value(object, Scimaenaga.config.user_schema) | ||
end | ||
|
||
def group_object_response(object) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なんでこういう実装になってるのか(なんでuserみたいにfind_valueだけじゃなくmembersを手動で作ってるのか)コメント書いた方がいいと思う
return if members_attribute.nil? | ||
|
||
members_raw = find_value(object, members_attribute) | ||
response[:members] = members_raw.map do |member| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
objectはnilありえる?
ありえるならここヌルポになる
Why?
To be available in "Application Gallery (Azure AD)", we have to support return group members.
What?
return group members