metamaps--metamaps/app/assets/javascripts/Jit/permissions.js
2013-01-23 22:05:24 -05:00

11 lines
No EOL
370 B
JavaScript

function authorizeToEdit(obj) {
if (userid && (obj.data.$permission == "commons" || obj.data.$userid == userid)) return true;
else return false;
}
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";
}