timschofield / webERP

webERP Accounting and Business Administration ERP system
https://www.weberp.org
GNU General Public License v2.0
29 stars 113 forks source link

default user admin cannot edit or create users #237

Closed dalers closed 6 days ago

dalers commented 1 week ago

A git pull this morning seems to affected permissions because users cannot be edited now.

A new database was created using default.sql, then SQL statemements 2 and 3 in upgrade4.15.1-4.15.2.sql were manually executed (statement 1 fails, see #236 ). The new database was then logged into, database required updates 1 to 7 were performed, then I logged out and back in, and accessed menu: Setup > General > Users Maintenance.

As can be seen in the screenshot, it is not possible to edit users even though the security role for the logged in user is "System Administrator".

image

Current code state:

dale@whizzer:/usr/local/www/weberp $ git remote -v; git branch; git log -n 1
origin  https://github.com/timschofield/webERP.git (fetch)
origin  https://github.com/timschofield/webERP.git (push)
* master
  v5.0
commit 727bb057b8c20cae2a1a1e0ddea05f260f3927a7 (HEAD -> master, origin/master, origin/HEAD)
Author: Tim Schofield <tim.schofield1960@googlemail.com>
Date:   Wed Nov 13 19:31:48 2024 +0000

    Add the WO Items ready to produce script to the default data

     Files changed in commit:
     install/demo.sql
dale@whizzer:/usr/local/www/weberp $
dalers commented 1 week ago

@timschofield I found the commit that broke the permissions. With the commit before this the Edit/Delete links in WWW_Users.php were shown, but not after this commit.

Nov 13 commit 2

dale@whizzer:/usr/local/www/weberp $ sudo -u www git checkout c8bd38a9e8c85928c99174c93279b5c9527e9f56
Previous HEAD position was 24c679ae7 Correct default time in the ConvertSQLDateTime() function. Should be 00:00:00 as reported by Pak Ricard
HEAD is now at c8bd38a9e Images in manual were showing at 32px x 32px size. Correct the css to show at 50% width
dale@whizzer:/usr/local/www/weberp $
timschofield commented 6 days ago

Fixed, thanks for the report

Tim

dalers commented 6 days ago

Agree resolved. Thanks Tim :-)

timschofield commented 19 hours ago

I think this was corrected. Do you agree the latest code doesn't have this error?

Actually the problem was with two conflicting css files!

Thanks Tim

On Fri, 15 Nov 2024 at 00:02, Dale Scott @.***> wrote:

After a git pull, it was noticed user permissions seems to have been affected. It was first noticed that Currencies in an existing database could not be edited, and then it was noticed users could not be edited or created.

A new database was created using default.sql, then SQL statemements 2 and 3 in upgrade4.15.1-4.15.2.sql were manually executed (statement 1 fails, see #236 https://github.com/timschofield/webERP/issues/236 ). The new database was then logged into, required Updates 1 to 7 were performed, then I logged out and back in, and accessed menu: Setup > General > Users Maintenance.

As can be seen, it is not possible to edit the users even though security role for the logged in user is "System Administrator".

image.png (view on web) https://github.com/user-attachments/assets/7733cd4c-7a92-477f-a9d5-4737f3001e2f

— Reply to this email directly, view it on GitHub https://github.com/timschofield/webERP/issues/237, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAL6LBUGLVRXJJD23QBCAD2AU227AVCNFSM6AAAAABR2BSJWCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY3DAMZZGUYTMNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- www.weberp.org http://www.weberpafrica.com @TimSchofield2 Blog: https://kwamoja.home.blog/