[Dev] [PATCH] README.maintenance: clarify how to become redmine admin

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Fri Jun 12 22:15:39 GMT 2020


Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 README.maintenance | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/README.maintenance b/README.maintenance
index 3f856d16d..f7b768b64 100644
--- a/README.maintenance
+++ b/README.maintenance
@@ -1,13 +1,26 @@
 # 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 rail console. This
+will give you a full ruby interpreter and access to some Redmine
+data:
+  $ sudo su labs
+  [labs at winston labs.parabola.nu]$ cd /srv/http/labs.parabola.nu/
+  [labs at winston labs.parabola.nu]$ ./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
+  [labs at winston labs.parabola.nu]$
+Now an "Administration" link should appear when you are logged in Redmine.
 
 # Maintenance
 
-- 
2.27.0



More information about the Dev mailing list