• Resolved No3x

    (@no3x)


    Hello, I try to restrict downloads to the group of an user.
    Which point in your code should be the right place to implement this globally? I didn’t found the right function, I guess. I was searching for a filter like “download_check_permisson” or something like that.

    Maybe you could give me a tip.
    Thanks for this plugin!

    http://wordpress.org/extend/plugins/easy-digital-downloads/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Pippin Williamson

    (@mordauk)

    Are you trying to restrict the purchase process or the file download process?

    Thread Starter No3x

    (@no3x)

    Both. I want to limit the access for users/groups – if they are not in the group anymore: no products view, no access, no download.

    You say “not a single one of the large WordPress ecommerce plugins has ever gotten really right” – so let me show you my point of view as input for improvement / features:
    I need a user control system with groups. The users are members of groups according to their maintenance contract. If the contract expires they will be expelled from the group. Each download requires a specific group.

    At this moment I implemented this by adapting some 3rd party plugins. But I think it’s better to implement it right into edd.

    Plugin Contributor Pippin Williamson

    (@mordauk)

    How are you determining a group? Is it a user role?

    Thread Starter No3x

    (@no3x)

    At this moment I assign capabilities to groups with a plugin called groups. In the second step I restrict the access to a download/post by asking for a specific capability that shouldd be given by a group. There are no roles affected. (Another plugin)
    E.g. group toy gets capability toy. Group flowers gets capability flowers. In the post I restrict by asking for capability “toy”. The user which is in group toy will see the download about toy.

    Plugin Contributor Pippin Williamson

    (@mordauk)

    Ok cool. You should be able to hook into the edd_process_verified_download action to check if the user has the appropriate cap.

    Thread Starter No3x

    (@no3x)

    Hello, thank you very much for your help.
    But the mentioned hook is not usefull for my requirements. I don’t want to show the download at all, if the user has not the caps. The download shouldn’t appear on the whole blog.
    So I have to check far before edd_process_verified_download.
    Do you have an idea?

    Plugin Contributor Pippin Williamson

    (@mordauk)

    You could hook into the “template_direct” action and check if the ID of the displayed page.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Adaptation] Restrict Downloads to Groups’ is closed to new replies.