metamaps--metamaps/app/assets/javascripts/Jit/permissions.js

11 lines
370 B
JavaScript
Raw Normal View History

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";
}