##// END OF EJS Templates
auth: Allow auth plugins to customize the slug which is used to generate URLs. #4078
Martin Bornhold -
r1086:91b0b3db default
parent child Browse files
Show More
@@ -226,6 +226,15 b' class RhodeCodeAuthPluginBase(object):'
226 226 """
227 227 raise NotImplementedError("Not implemented in base class")
228 228
229 def get_url_slug(self):
230 """
231 Returns a slug which should be used when constructing URLs which refer
232 to this plugin. By default it returns the plugin name. If the name is
233 not suitable for using it in an URL the plugin should override this
234 method.
235 """
236 return self.name
237
229 238 @property
230 239 def is_headers_auth(self):
231 240 """
@@ -45,7 +45,7 b' class AuthnPluginResourceBase(AuthnResou'
45 45
46 46 def __init__(self, plugin):
47 47 self.plugin = plugin
48 self.__name__ = plugin.name
48 self.__name__ = plugin.get_url_slug()
49 49 self.display_name = plugin.get_display_name()
50 50
51 51
General Comments 0
You need to be logged in to leave comments. Login now