[Dev] [PATCH v2] README.maintenance: clarify how to become redmine admin
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Sat Jun 13 13:26:12 GMT 2020
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
README.maintenance | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/README.maintenance b/README.maintenance
index 3f856d16d..507253287 100644
--- a/README.maintenance
+++ b/README.maintenance
@@ -1,13 +1,24 @@
# Redmine Web Admin
-To set yourself as web admin temporarily:
- $ sudo su labs
- $ cd /srv/http/labs.parabola.nu/
- $ ./enter-rails-console
- > HACKERS['me'].admin = true
- > HACKERS['me'].save
- > exit
+To set yourself as web admin, you need to use Redmine's rail console.
+After logging in winston, run the Redmine's rail console. This
+will give you a full ruby interpreter and access to some Redmine
+data:
+ $ cd /srv/http/labs.parabola.nu/
+ $ sudo -u labs ./enter-rails-console
+ irb(main):001:0>
+
+Then you need to find your user. To do that you can use your
+username. Here my exact Redmine username is GNUtoo, so I'll
+use that in the example below:
+ irb(main):002:0> me = (User.all.where :login => 'GNUtoo')[0]
+
+Then we set that username to admin, save and exit:
+ irb(main):003:0> me.admin = true
+ irb(main):004:0> me.save
+ irb(main):001:0> exit
+Now an "Administration" link should appear when you are logged in Redmine.
# Maintenance
--
2.27.0
More information about the Dev
mailing list