role added in some pages

This commit is contained in:
Nabin Hait 2013-04-09 11:49:42 +05:30
parent 832320dc15
commit 8022a439a8
4 changed files with 47 additions and 24 deletions

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-06-14 18:44:56",
"creation": "2013-04-09 11:45:31",
"docstatus": 0,
"modified": "2013-04-03 14:59:38",
"modified": "2013-04-09 11:47:32",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -3,9 +3,10 @@ import webnotes.model
def execute():
for p in ["activity", "todo", "questions", "question-view"]:
pbean = webnotes.bean("Page", p)
pbean.doclist.append({
"doctype": "Page Role",
"role": "All",
"parentfield": "roles"
})
pbean.save()
if len(pbean.doclist) == 1:
pbean.doclist.append({
"doctype": "Page Role",
"role": "All",
"parentfield": "roles"
})
pbean.save()

View File

@ -1,20 +1,31 @@
[
{
"owner": "Administrator",
"creation": "2013-04-09 11:45:31",
"docstatus": 0,
"creation": "2011-05-04 11:09:50",
"modified": "2013-04-09 11:47:24",
"modified_by": "Administrator",
"modified": "2011-03-29 13:54:27"
"owner": "Administrator"
},
{
"name": "__common__",
"doctype": "Page",
"module": "Utilities",
"standard": "Yes",
"name": "__common__",
"page_name": "Question View",
"doctype": "Page"
"standard": "Yes"
},
{
"name": "question-view",
"doctype": "Page"
"doctype": "Page Role",
"name": "__common__",
"parent": "question-view",
"parentfield": "roles",
"parenttype": "Page",
"role": "All"
},
{
"doctype": "Page",
"name": "question-view"
},
{
"doctype": "Page Role"
}
]

View File

@ -1,20 +1,31 @@
[
{
"owner": "Administrator",
"creation": "2013-04-09 11:45:31",
"docstatus": 0,
"creation": "2011-05-04 11:09:49",
"modified": "2013-04-09 11:47:36",
"modified_by": "Administrator",
"modified": "2011-03-29 13:53:57"
"owner": "Administrator"
},
{
"name": "__common__",
"doctype": "Page",
"module": "Utilities",
"standard": "Yes",
"name": "__common__",
"page_name": "Questions",
"doctype": "Page"
"standard": "Yes"
},
{
"name": "questions",
"doctype": "Page"
"doctype": "Page Role",
"name": "__common__",
"parent": "questions",
"parentfield": "roles",
"parenttype": "Page",
"role": "All"
},
{
"doctype": "Page",
"name": "questions"
},
{
"doctype": "Page Role"
}
]