[gen] Added some utility methods.

This commit is contained in:
Gaetan Delannay 2014-06-01 11:44:07 +02:00
parent 2eee217b05
commit 6494bf22c7
3 changed files with 35 additions and 1 deletions

View file

@ -937,7 +937,7 @@ class Ref(Field):
return gutils.No('no_write_perm')
# May the user create instances of the referred class?
if not obj.getTool().userMayCreate(self.klass):
return gutils.No('no_add_perm')
return gutils.No('no_create_perm')
return True
def checkAdd(self, obj):