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

Support master_key_required parameter at skygear.op #147

Open
2 tasks
rickmak opened this issue Jul 10, 2017 · 0 comments
Open
2 tasks

Support master_key_required parameter at skygear.op #147

rickmak opened this issue Jul 10, 2017 · 0 comments

Comments

@rickmak
Copy link
Member

rickmak commented Jul 10, 2017

Current way of doing it is

@skygear.op('user:forgot-password:test', key_required=True)
def func():
    access_key_type = current_context().get('access_key_type')
    if not access_key_type or access_key_type != 'master':
        raise SkygearException(
            'master key is required',
            skyerror.AccessKeyNotAccepted
        )
    # Logic

Example code if we add master_key_required

@skygear.op('user:forgot-password:test', master_key_required=True)
def func():
    # Logic
  • Skygear Server Date/Version: v1.0, 10 July, 2017
  • Application Platform:
  • Is this a regression?
  • Attached logs, screenshots
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