Changeset 966
- Timestamp:
- Mar 29, 2016, 3:06:14 PM (5 years ago)
- Location:
- epoptes/trunk/fuentes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
epoptes/trunk/fuentes/debian/changelog
r298 r966 1 epoptes (0.5.9) xenial; urgency=medium 2 3 * Patched to hide teacher clients when one teacher isn't promoted 4 5 -- M.Angel Juan <m.angel.juan@gmail.com> Tue, 29 Mar 2016 15:05:09 +0200 6 1 7 epoptes (0.5.8) xenial; urgency=medium 2 8 -
epoptes/trunk/fuentes/epoptes/ui/gui.py
r295 r966 665 665 self.set_move_group_sensitivity() 666 666 667 def searchInGroups(self,yo,cliente): 668 if (yo == cliente): 669 return 1 670 import subprocess as sp 671 p1 = sp.Popen(["id",yo],stdout=sp.PIPE) 672 p2 = sp.Popen(["id",cliente],stdout=sp.PIPE) 673 out1,err1 = p1.communicate() 674 out2,err2 = p2.communicate() 675 if (out2.find('teachers') == -1): 676 #if he is student must be showed 677 return 1 678 else: 679 #he's a teacher 680 if (out1.find('admins') == -1): 681 #if im not promoted teacher other teachers must be hidden 682 return 0 683 else: 684 #if im a promoted teacher other teachers must be displayed 685 return 1 686 667 687 668 688 def addToIconView(self, client): … … 676 696 if client.users: 677 697 for hsession, user in client.users.iteritems(): 678 self.cstore.append([self.calculateLabel(client, user[label]), self.imagetypes[client.type], client, hsession]) 679 self.askScreenshot(hsession, True) 698 if self.searchInGroups(self.n4d_user,user['uname']): 699 self.cstore.append([self.calculateLabel(client, user[label]), self.imagetypes[client.type], client, hsession]) 700 self.askScreenshot(hsession, True) 680 701 else: 681 702 self.cstore.append([self.calculateLabel(client), self.imagetypes[client.type], client, ''])
Note: See TracChangeset
for help on using the changeset viewer.