mercurial/hgweb/common.py
changeset 50442 4bddc2f72879
parent 50436 4077d6222cf1
child 50926 18c8c18993f0
--- a/mercurial/hgweb/common.py	Fri Apr 05 01:17:15 2019 +0200
+++ b/mercurial/hgweb/common.py	Sat Apr 13 01:53:59 2019 +0200
@@ -21,6 +21,7 @@
 from .. import (
     encoding,
     pycompat,
+    scmutil,
     templater,
     util,
 )
@@ -39,15 +40,7 @@
 HTTP_UNSUPPORTED_MEDIA_TYPE = 415
 HTTP_SERVER_ERROR = 500
 
-
-def ismember(ui, username, userlist):
-    """Check if username is a member of userlist.
-
-    If userlist has a single '*' member, all users are considered members.
-    Can be overridden by extensions to provide more complex authorization
-    schemes.
-    """
-    return userlist == [b'*'] or username in userlist
+ismember = scmutil.ismember
 
 
 def hashiddenaccess(repo, req):