Show More
@@ -762,6 +762,16 b' def allowed_auth_token_access(view_name,' | |||
|
762 | 762 | from rhodecode import CONFIG |
|
763 | 763 | whitelist = aslist( |
|
764 | 764 | CONFIG.get('api_access_controllers_whitelist'), sep=',') |
|
765 | # backward compat translation | |
|
766 | compat = { | |
|
767 | # old controller, new VIEW | |
|
768 | 'ChangesetController:*': 'RepoCommitsView:*', | |
|
769 | 'ChangesetController:changeset_patch': 'RepoCommitsView:repo_commit_patch', | |
|
770 | 'ChangesetController:changeset_raw': 'RepoCommitsView:repo_commit_raw', | |
|
771 | 'FilesController:raw': 'RepoCommitsView:repo_commit_raw', | |
|
772 | 'FilesController:archivefile': 'RepoFilesView:repo_archivefile', | |
|
773 | 'GistsController:*': 'GistView:*', | |
|
774 | } | |
|
765 | 775 | |
|
766 | 776 | log.debug( |
|
767 | 777 | 'Allowed views for AUTH TOKEN access: %s' % (whitelist,)) |
@@ -769,6 +779,10 b' def allowed_auth_token_access(view_name,' | |||
|
769 | 779 | |
|
770 | 780 | for entry in whitelist: |
|
771 | 781 | token_match = True |
|
782 | if entry in compat: | |
|
783 | # translate from old Controllers to Pyramid Views | |
|
784 | entry = compat[entry] | |
|
785 | ||
|
772 | 786 | if '@' in entry: |
|
773 | 787 | # specific AuthToken |
|
774 | 788 | entry, allowed_token = entry.split('@', 1) |
General Comments 0
You need to be logged in to leave comments.
Login now