← Back to team overview

mugle-dev team mailing list archive

Checking permissions

 

Thanks Scott, for the tip to look in GameFileServiceImpl.checkPermissions.

One thing I don't understand (and possibly a bug), what is this code doing:

        ClientView cv = (curUser.getPrimaryKey() == object.getPrimaryKey())
?
                ClientView.PRIVATE : ClientView.PUBLIC;

I don't know what a ClientView is exactly. But this code makes no sense...
why is it checking if the current user's primary key is equal to the
GameFile's primary key? Surely those keys will never be equal, and therefore
the view will always be public?

Follow ups