Changeset 1785 for pykota/trunk/bin/repykota
- Timestamp:
- 10/06/04 12:05:47 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/repykota
r1546 r1785 24 24 # 25 25 # $Log$ 26 # Revision 1.50 2004/10/06 10:05:47 jalet 27 # Minor changes to allow any PyKota administrator to launch enhanced versions 28 # of the commands, and not only the root user. 29 # 26 30 # Revision 1.49 2004/06/18 13:34:49 jalet 27 31 # Now all tracebacks include PyKota's version number … … 239 243 with "laser" or ends with "pson". 240 244 241 If launched by a non-root user, additionnal arguments representing242 users or groups names are ignored, and only the current user/group243 is reported.245 If launched by an user who is not a PyKota administrator, additionnal 246 arguments representing users or groups names are ignored, and only the 247 current user/group is reported. 244 248 245 249 This program is free software; you can redistribute it and/or modify … … 263 267 def main(self, ugnames, options) : 264 268 """Print Quota reports generator.""" 265 uid = os.geteuid() 266 if not uid : 267 # root user 269 if self.config.isAdmin : 270 # PyKota administrator 268 271 if not ugnames : 269 272 # no username, means all usernames … … 272 275 # not the root user 273 276 # reports only the current user 274 username = pwd.getpwuid( uid)[0]277 username = pwd.getpwuid(os.geteuid())[0] 275 278 if options["groups"] : 276 279 user = self.storage.getUser(username)