They are only required in non-dynamic ACL implementations.
Signed-off-by: Patrick Uiterwijk patrick@puiterwijk.org
I realize that this will be a controversial PR, I am opening this primarily for discussion.
My main reason for filing this is that it feels silly to add something like this to dynamic ACL plugins:
@classmethod def generate_acls(cls, project, group=None): """ Required function that doesn't do anything. """ pass @classmethod def remove_acls(cls, session, project): """ Required function that is unused. """ pass
Especially if we want to move to preferring dynamic auth backends (because they would be required for instances that want to get rid of Gitolite).
rebased onto e34598356207cd40c8c74f5353702bb394a66498
I have rebased this on top of PR #3853 to make use of the class instantiation to still provide early errors for non-implemented, required functions.
3 new commits added
Do not mark generate_acls and remove_acls as abstract methods
Cache the instantiated auth backend instance
Instantiate the git auth backend class returned
It doesn't seem that silly to me.
:thumbsup:
rebased onto 519165c0c5d26d4c9d1cb205012e29dc7472c529
I'm not quite sure about this one since the __init___ can easily be overwritten and therefore by-passing the checks in place here :(
__init___
I'm kinda thinking let's stick with this for now and re-consider when we approach 6.0
Sure, works for me. It was really just as a suggestion :).
Pull-Request has been closed by puiterwijk
They are only required in non-dynamic ACL implementations.
Signed-off-by: Patrick Uiterwijk patrick@puiterwijk.org