Hi web2py,
here's my controller:
def index():
#create
forms = []
### forms = [crud.create(db.category)]
#update
parentId = request.vars.cat or "0"
categories = db(db.category.parent_id == parentId).select()
for cat in categories:
forms.append(crud.update(db.category, cat.id))
return dict(forms=forms)
view:
{{extend 'layout.html'}}
{{for form in forms:}}
{{=form}}
{{pass}}
And here is my problem:
current user has update permission, but not delete permission on
db.category table.
However, user can delete entry with "Check to delete" option.
How to give delete option only to users with delete permission?
Also, if i uncomment "### forms = [crud.create(db.category)]" line, it
throws "not authorized" if user does not have create permission.
How to make crud just "ignore" that form and create others (sth like
partial permissions)?
I tried using components and load each with ajax, but then i have
problem with "check to delete" because YesNo form is shown three
times... weird
This is my first day with crud and I'm about to go back doing things
manually, without crud.