2013-01-23 18:43:01 +00:00
|
|
|
|
|
|
|
function authorizeToEdit(obj) {
|
|
|
|
if (userid && (obj.data.$permission == "commons" || obj.data.$userid == userid)) return true;
|
|
|
|
else return false;
|
2013-01-24 03:05:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function mk_permission(obj) {
|
|
|
|
if (obj.getData("permission") == "commons") return "co";
|
|
|
|
else if (obj.getData("permission") == "public") return "pu";
|
|
|
|
else if (obj.getData("permission") == "private") return "pr";
|
2013-01-23 18:43:01 +00:00
|
|
|
}
|