##// END OF EJS Templates
ui: trusted_users -> _trustusers, trusted_groups -> _trustgroups
Matt Mackall -
r8201:7cf2b987 default
parent child Browse files
Show More
@@ -20,15 +20,15 b' class ui(object):'
20 self.overlay = config.config()
20 self.overlay = config.config()
21 self.cdata = config.config()
21 self.cdata = config.config()
22 self.ucdata = config.config()
22 self.ucdata = config.config()
23 self.trusted_users = {}
23 self._trustusers = {}
24 self.trusted_groups = {}
24 self._trustgroups = {}
25
25
26 if src:
26 if src:
27 self.cdata = src.cdata.copy()
27 self.cdata = src.cdata.copy()
28 self.ucdata = src.ucdata.copy()
28 self.ucdata = src.ucdata.copy()
29 self.overlay = src.overlay.copy()
29 self.overlay = src.overlay.copy()
30 self.trusted_users = src.trusted_users.copy()
30 self._trustusers = src._trustusers.copy()
31 self.trusted_groups = src.trusted_groups.copy()
31 self._trustgroups = src._trustgroups.copy()
32 self.fixconfig()
32 self.fixconfig()
33 else:
33 else:
34 # we always trust global config files
34 # we always trust global config files
@@ -54,8 +54,7 b' class ui(object):'
54 if util.isowner(fp, st):
54 if util.isowner(fp, st):
55 return True
55 return True
56
56
57 tusers = self.trusted_users
57 tusers, tgroups = self._trustusers, self._trustgroups
58 tgroups = self.trusted_groups
59 if '*' in tusers or '*' in tgroups:
58 if '*' in tusers or '*' in tgroups:
60 return True
59 return True
61
60
@@ -118,9 +117,9 b' class ui(object):'
118
117
119 # update trust information
118 # update trust information
120 for user in self.configlist('trusted', 'users'):
119 for user in self.configlist('trusted', 'users'):
121 self.trusted_users[user] = 1
120 self._trustusers[user] = 1
122 for group in self.configlist('trusted', 'groups'):
121 for group in self.configlist('trusted', 'groups'):
123 self.trusted_groups[group] = 1
122 self._trustgroups[group] = 1
124
123
125 def setconfig(self, section, name, value):
124 def setconfig(self, section, name, value):
126 for cdata in (self.overlay, self.cdata, self.ucdata):
125 for cdata in (self.overlay, self.cdata, self.ucdata):
General Comments 0
You need to be logged in to leave comments. Login now