~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/database.py

  • Committer: William Grant
  • Date: 2009-06-29 06:43:20 UTC
  • Revision ID: grantw@unimelb.edu.au-20090629064320-vrahlocbh0d5852w
Allow admins to set the admin flag with ivle-adduser (issue #151).

ivle-makeuser was also renamed to ivle-adduser.

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
 
118
118
    @property
119
119
    def display_name(self):
 
120
        """Returns the "nice name" of the user or group."""
120
121
        return self.fullname
121
122
 
122
123
    @property
 
124
    def short_name(self):
 
125
        """Returns the database "identifier" name of the user or group."""
 
126
        return self.login
 
127
 
 
128
    @property
123
129
    def password_expired(self):
124
130
        fieldval = self.pass_exp
125
131
        return fieldval is not None and datetime.datetime.now() > fieldval
559
565
 
560
566
    @property
561
567
    def display_name(self):
562
 
        return '%s (%s)' % (self.nick, self.name)
 
568
        """Returns the "nice name" of the user or group."""
 
569
        return self.nick
 
570
 
 
571
    @property
 
572
    def short_name(self):
 
573
        """Returns the database "identifier" name of the user or group."""
 
574
        return self.name
563
575
 
564
576
    def get_projects(self, offering=None, active_only=True):
565
577
        '''Find projects that the group can submit.