Changeset 3657
- Timestamp:
- 08/25/06 05:50:46 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/per-object-permissions/django/contrib/auth/models.py
r3655 r3657 425 425 cursor.execute(sql, [app_label, ContentType.objects.get_for_model(User).id, self.id, False]) 426 426 count = int(cursor.fetchone()[0]) 427 print "User. App: %s, Count: %d" % (app_label, count)428 427 if count>0: 429 428 return True … … 455 454 backend.quote_name('app_label'), backend.quote_name('negative'), 456 455 backend.quote_name('owner_ct_id')) 457 cursor.execute(sql, [ app_label, self.id, False, ContentType.objects.get_for_model(Group).id])456 cursor.execute(sql, [self.id, app_label, False, ContentType.objects.get_for_model(Group).id]) 458 457 count = int(cursor.fetchone()[0]) 459 print "Group. App: %s, Count: %d" % (app_label, count)460 458 return (count>0) 461 459
