views.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:ablator 作者: ablator 项目源码 文件源码
def get(self, request, client_user_string, functionality_group_id):
        """
        Is the specified user allowed to use the functionality?

        Returns `{ "enabled": true }` if the specified ClientUser is allowed to use the
        functionality group, ``{ "enabled": false }`` if the user is disallowed, or a 404 error if
        functionality group does not exist.

        Include a string that uniquely identifies the user as the client user string.

        See also the `which` endpoint to see if a user has a specific functionality group within a
        functionality
        """
        functionality_group = get_object_or_404(Functionality, id=functionality_group_id)
        client_user = ClientUser.user_from_object(client_user_string)
        return Response({'enabled': can_i_use(client_user, functionality_group)})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号