Skip to content

caplod/refinerycms-downloads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Downloads engine for Refinery CMS.

About

Protected File Downloads.

Key features:

  • Upload your Files in the Backend
  • Assign the Role 'Downloads' to Users
  • Only these Users can access the Downloadpage

Requirements

RefineryCMS version 0.9.8 or later.

Gem Installation using Bundler (The very best way)

Include the latest gem into your Refinery CMS application's Gemfile:

gem "refinerycms-downloads"

Then type the following at command line inside your Refinery CMS application's root directory:

bundle install
rails generate refinerycms_downloads
rake db:migrate                     

In Settings the role 'superuser_can_assign_roles' has to be true. Then add a User and give him Role access Downloads.

Then add the following lines to your ApplicationController in order to redirect Users to the Downloadpage after logging in

# redirect for private users
def after_sign_in_path_for(resource)
  if resource.is_a?(User) && resource.has_role?(:downloads)
    download_root_url 
  else
    super
  end
end

About

Private Downloads engine for Refinery CMS

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages