top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

User roles, authorisation, on specific projects when using Rails

+1 vote
257 views

Currently I am working on a app, so far I have User (with devise) which are able to create projects. So, if user1 create project A and project B I want him, to be able to assign user2 with role admin on project A, and user2 with moderator admin on project B. I was thinking in creating a UserRoleProject link table, is it a good idea? Also I intend to use CanCan for the authorisation.

posted Jul 23, 2013 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

In my rails app, so far I have User (with devise) which are able to create projects. So, if user1 creates project A and project B I want him, to be able to assign user2 with role admin on project A, and user2 with moderator role on project B. I was thinking in creating a UserRoleProject link table, is it a good idea? Or if not please help me with some pointers.

The action will be something like, User1 select from a list user2, select a project from another list(that user1 created), and select the role that the user2 will have on that project. Any user will be able to perform the same action on their projects.

0 votes

I have Rails version 2.3.8.I am using Netbeans 6.9.1 as IDE. I want to redirect localhost:3000 to a specific page. I opened routes.rb file and uncommented the line

 map.root :controller => "Welcome"

I created a controller named Welcome and a view named index. I also deleted the default index file as suggested in some of the websites.However, the page is not getting redirected to new index page. What is the problem??

+1 vote

I am using omni-auth for the user authentication and logged in the user via access token.

But like facebook i want to fetch the user profile information and all the albums he/she uploaded and images belongs to that albums, than save the public url to my own database.

I found fb_graph a very good gem to use FB Graph search but i could not find any Gem that helps me to extract images,albums from Google+. Any suggestions and gem that can solve this problem are welcome.

+2 votes

I have found a html template where I some pages need specific css files and of course there are some common css files.

How can I best deal with it ?

+1 vote

experimenting with optimizing some areas that involve long processing times on some SQL selects (or any background task, really). This is in Rails 4.0.0 with Ruby 2.0.0p247, PostgreSQL 9.2.4.

In this case, I can do intelligent dividing of selects to even the workload among N processes for the DB backend.

I currently am trying Spawnling, and this works for exactly one hit before I have to restart the web service:
spawns = [] ABC.each do # criteria for selects to divide load spawns

...