Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create a new currency #943

Closed
aclex opened this issue Oct 20, 2017 · 8 comments
Closed

Can't create a new currency #943

aclex opened this issue Oct 20, 2017 · 8 comments

Comments

@aclex
Copy link

aclex commented Oct 20, 2017

Just finally installed FF3 and tried to set it up beginning with creating my currency, but when I press "Create a new currency" button on Options > Currencies I've got two popups, message and error each telling: "Please ask mail@example.com to add, remove or edit currencies.". Following the guidelines here I also tried the demo site and seems to behave the same way. Trying to edit the existing currency leads to exactly the same result.

The debug-level log reads:

[2017-10-20 00:40:55] production.DEBUG: Check if user has already seen intro with key "shown_demo_currencies_create". Result is 0
[2017-10-20 00:40:56] production.DEBUG: Check if user has already seen intro with key "shown_demo_currencies_index". Result is 1
[2017-10-20 00:40:57] production.DEBUG: viewRange is 1M

So, my questions are:

  1. If this is a feature (implying that adding another currency is admin task and should be taken seriously), how can I still add the currency the proper way? Or maybe I somehow should grant the right the user to create a currency?

  2. Again, if this is not a bug, maybe, one of the pop-ups, message or error, is excessive and one would be enough?

@JC5
Copy link
Member

JC5 commented Oct 20, 2017

There are a lot of popups indeed and I will make sure there are less of them in the future. But being the only user you should be admin.

How many entries are there in the users table?

JC5 added a commit that referenced this issue Oct 20, 2017
@aclex
Copy link
Author

aclex commented Oct 20, 2017

Just checked , there's only one user in the users table, from which I'm logged in:

 id |     created_at      |     updated_at      |      email      |                           password                           | remember_token | reset | blocked | blocked_code 
----+---------------------+---------------------+-----------------+--------------------------------------------------------------+----------------+-------+---------+--------------
  1 | 2017-10-19 23:56:14 | 2017-10-19 23:56:14 | aclex@aclex.com | $2y$10$EoEkVlZ1UUbgIrn.xB60yuHAvtYhJNUxa/kvBJKt9zBdvv2SaT0Xe |                |       |       0 | 

@JC5
Copy link
Member

JC5 commented Oct 20, 2017

OK good! I am not sure what went wrong but we can investigate further.

Could you open the table roles? It should have two entries, one for "Site Owner" and the other for "Demo User". If so, remember the ID of the "Site Owner".

Open table role_user. It is probably empty. A new entry must be created. user_id must be 1, and role_id must be what you remembered previously (probably 1).

@aclex
Copy link
Author

aclex commented Oct 20, 2017

And yes, the e-mail address in the message is not of this user, but the default one from the .env file, apparently mentioned in the SITE_OWNER. Maybe, I should also change SITE_OWNER in .env file to the user I'm logging in?

@JC5
Copy link
Member

JC5 commented Oct 20, 2017

It doesn't really matter. The message is meant for other users of your installation, if you have any.

You can change the SITE_OWNER but as long as you do not have the proper role, it will not work.

@aclex
Copy link
Author

aclex commented Oct 20, 2017

Oh yes, indeed, just tried it first) So will follow your instructions in the previous reply.

@aclex
Copy link
Author

aclex commented Oct 20, 2017

Nice, now it works! Thanks @JC5 from instant help! Can I collect any useful information on why it wasn't bound automatically, or this is expected behaviour?

@JC5
Copy link
Member

JC5 commented Oct 20, 2017

It's not expected, but I will debug it locally. Thanks for your offer! 👍

@JC5 JC5 closed this as completed Oct 20, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants