Docs: Difference between revisions
Appearance
→Our World Of Text: permissions.js |
|||
| Line 3,314: | Line 3,314: | ||
can_go_to_coord: function(user, world) { | can_go_to_coord: function(user, world) { | ||
return Permissions.user_matches_perm(user, world, world.feature_go_to_coord); | return Permissions.user_matches_perm(user, world, world.feature_go_to_coord); | ||
}, | |||
</syntaxhighlight> | |||
|- | |||
|can_paste | |||
|Checks if user can paste. | |||
|<syntaxhighlight lang="js" line="1" start="34"> | |||
can_paste: function(user, world) { | |||
return Permissions.user_matches_perm(user, world, world.feature_paste); | |||
}, | |||
</syntaxhighlight> | |||
|- | |||
|can_copy | |||
|Checks if user can copy. | |||
|<syntaxhighlight lang="js" line="1" start="37"> | |||
can_copy: function(user, world) { | |||
if(user.is_owner || user.is_member) return true; | |||
return !world.no_copy; | |||
}, | }, | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||