montera34 / pageonex

PageOneX. Analyzing front pages
http://pageonex.com
GNU Affero General Public License v3.0
54 stars 13 forks source link

Add superuser in production to have rights to edit/erase threads #130

Closed numeroteca closed 11 years ago

numeroteca commented 11 years ago

great! is it possible to activate it from dashboard or does it need to be activated from database?

elplatt commented 11 years ago

Currently only from the database or rails console. On Apr 29, 2013 6:32 PM, "numeroteca" notifications@github.com wrote:

great! is it possible to activate it from dashboard or does it need to be activated from database?

— Reply to this email directly or view it on GitHubhttps://github.com/numeroteca/pageonex/issues/130#issuecomment-17198867 .

elplatt commented 11 years ago

To set admin, from rails console (replace user@domain.com with the user's email):

User.find_by_email('user@domain.com').update_attribute :admin, true

numeroteca commented 11 years ago

After running it, I get the following error in the irb console:

NameError: uninitialized constant User
    from (irb):1
elplatt commented 11 years ago

Make sure to run console in production mode:

RAILS_ENV="production" rails console

On Wed, May 1, 2013 at 6:08 PM, numeroteca notifications@github.com wrote:

After running it, I get the following error in the irb console:

NameError: uninitialized constant User from (irb):1

— Reply to this email directly or view it on GitHubhttps://github.com/numeroteca/pageonex/issues/130#issuecomment-17309678 .

Edward L. Platt http://elplatt.com http://civic.mit.edu/users/elplatt http://i3detroit.com @EdwardLPlatt http://twitter.com/EdwardLPlatt

numeroteca commented 11 years ago

Great, thanks for the hint. I could test that I am able to delete other user thread.

We should extend admin rights to code and edit the highlighted areas of all the threads. Also add button for editing/deleting in the display view.

Might be related to #75 (roles of collaborators in threads).