160 | | if self.form.has_key("ugmask") : |
161 | | ugmask = self.form["ugmask"].value |
162 | | else : |
163 | | ugmask = "*" |
| 163 | remuser = os.environ.get("REMOTE_USER", "root") |
| 164 | if remuser == "root" : |
| 165 | if self.form.has_key("ugmask") : |
| 166 | ugmask = self.form["ugmask"].value |
| 167 | else : |
| 168 | ugmask = "*" |
| 169 | else : |
| 170 | if self.form.has_key("isgroup") : |
| 171 | user = self.storage.getUser(remuser) |
| 172 | if user.Exists : |
| 173 | ugmask = " ".join([ g.Name for g in self.storage.getUserGroups(user) ]) |
| 174 | else : |
| 175 | ugmask = remuser # result will probably be empty, we don't care |
| 176 | else : |
| 177 | ugmask = remuser |