Show
Ignore:
Timestamp:
06/18/07 12:12:08 (6 years ago)
Author:
iacopo <iacopo@…>
Children:
231baae5e52de5b97c1d1f8533751d9f3e39b30b
Parents:
847909582f0defeb8a93b0c4fd2f374a0da0db7f
git-committer:
iacopo <iacopo@…> (06/18/07 12:12:08)
Message:

Show user group modified. TODO: better gui that shows user groups

git-svn-id:  https://labs.truelite.it/svn/octofuss/trunk@463 5a101938-5c21-0410-9b5a-a83d6f3706a9

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • octofuss/users/ui/__init__.py

    rbf2e42e rc6e3b1b  
    558558        def show_user_groups(self, obj, userList, user_view, group_view): 
    559559                """ Show groups of selected user """ 
    560                 """ 
    561560                model = user_view.get_model()  
    562561 
     
    572571                        #Remove primary group 
    573572                        primaryGroupName = backend.getGroupByGid(backend.getUser(username).getGid().getValue()).getName().getValue() 
    574                         try: 
    575                                 userGroups.remove(primaryGroupName) 
    576                         except Exception,e: 
    577                                 print e 
     573                        #try: 
     574                        #        userGroups.remove(primaryGroupName) 
     575                        #except Exception,e: 
     576                        #        print e 
    578577                         
    579578                        import string 
    580579                         
    581580                        userGroups.sort() 
    582                         stringGroups = string.capitalize(username)+"'s groups:\n" 
     581                        stringGroups = string.capitalize(username)+"'s groups:\n\n" 
     582                        i = 0 
     583                        j = 0 
    583584                        for group in userGroups: 
    584                                 stringGroups = stringGroups +"- "+  group + "\n" 
     585                                if backend.isUnixGroup(group):   
     586                                        stringGroups = stringGroups +"Unix: "+  group + "\n" 
     587                                elif backend.isLdapGroup(group): 
     588                                        if group == primaryGroupName: 
     589                                                stringGroups = stringGroups +"Main group: "+  group + "\n" 
     590                                        else: 
     591                                                stringGroups = stringGroups +"Ldap: "+  group + "\n" 
     592 
     593 
    585594                        self.showDialog(stringGroups,gtk.MESSAGE_INFO) 
    586                 """ 
    587595                                 
    588596