-
Notifications
You must be signed in to change notification settings - Fork 28
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
global: records permissions dependency removal #53
Conversation
@@ -0,0 +1,42 @@ | |||
# -*- coding: utf-8 -*- |
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.
Isn't this just pushing the problem from inveniosoftware/invenio-records#137 down the stack? I.e. I don't think it should be added here.
For the example app, i think you can create an example of a permission factory that relies on metadata inside the record.
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.
Which permission factory do you propose as default for RECORDS_UI_DEFAULT_PERMISSION_FACTORY
?
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.
None
? 😄
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.
It means that I will remove also the tests that involve permissions?
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.
deny_all
by default? update: maybe too restrictive ...
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.
None
looks fine because of this if
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.
@lnielsen @jirikuncar
what would you like to do with the docs?
Could you help me to change it (if needed)?
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.
IMHO we can remove the reference to invenio_records
and replace it with perm_factory
defined in the paragraph above.
@jirikuncar @lnielsen |
@hachreak In my opinion not, because it means something is wrong in the system. You have a record which is not deleted, not redirected etc, on which you have setup and endpoint, but it can't resolve down to a record. |
d480104
to
fa7939b
Compare
@@ -268,7 +268,7 @@ | |||
permission factory: | |||
|
|||
>>> app.config['RECORDS_UI_DEFAULT_PERMISSION_FACTORY'] = \ | |||
... 'invenio_records.permissions:permission_factory' | |||
... 'mymodule:my_permission_factory' |
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.
What about using perm_factory
directly here instead a fictive path?
fa7939b
to
308b6dc
Compare
@@ -48,7 +47,8 @@ def permission_factory(self): | |||
"""Load default permission factory.""" | |||
if self._permission_factory is None: | |||
imp = self.app.config['RECORDS_UI_DEFAULT_PERMISSION_FACTORY'] | |||
self._permission_factory = import_string(imp) if imp else None | |||
self._permission_factory = obj_or_import_string(imp) \ | |||
if imp else None |
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.
Do we need it?
308b6dc
to
27e81f2
Compare
* Removes invenio-records permissions dependency. (addresses inveniosoftware/invenio-records#138) Signed-off-by: Leonardo Rossi <[email protected]>
27e81f2
to
6a6f26c
Compare
ping @jirikuncar |
(addresses global: removal of access permissions invenio-records#138)
Signed-off-by: Leonardo Rossi [email protected]