The Goal: I'm trying to setup functionality similar to a library with downloadable files. Only one user can download a file at a time.
The Solution: Use the Flag module.
Open to suggestions but through my research it seems like people are using the Flag module for this type of functionality. My question is how do I actually get this to work? I'm using a file field to add a file to a node. An admin comes along, wants to "checkout" that file, and they click the checkout flag, and then download the file. Now no other admin can download that file.
Once the original admin comes back, they can just click the flag again, setting it to open. (I know, they aren't really returning a digital file.) They just need to simulate returning it by basically just telling the system someone else can get this file.
Thanks for any suggestions and help.
Comments
Comment #1
joachim commentedIIRC there is a core hook that allows you to allow or deny file access. You'd need that to check the flag. Though you might be better off flagging the file rather than the node.