?

Log in

No account? Create an account
LiveJournal Development [entries|archive|friends|userinfo]
LiveJournal Development

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

May 30th, 2003

Deleting comments + viewer_is_owner() [May. 30th, 2003|02:54 pm]
LiveJournal Development

lj_dev

[miome]
[mood |curiouscurious]

I (and originally, Jaq in lj_style) am trying to duplicate the old functionality of EntryPage - specifically, making it so that a delete button appears only on those comments that the viewer actually has the ability to delete. Naturally, the owner of the entry can delete any comments, and we can detect if the viewer is that person with viewer_is_owner().

However, the person who posted the comment also has the ability to delete it - the question is, how do we find out if the viewer is that person? Should viewer_is_owner() really be checking the owner of the entry, or the owner of the comment? (Since this is happening in the comment.print function.)

viewer_is_owner() : bool Returns true if the user viewing the page is both logged in, and is the owner of the content in question. Useful for returning links to manage information, or edit entries.
link6 comments|post comment

navigation
[ viewing | May 30th, 2003 ]
[ go | Previous Day|Next Day ]