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

Missing author permission of projects #337

Closed
kulisu opened this issue Sep 17, 2016 · 1 comment

Comments

@kulisu
Copy link

commented Sep 17, 2016

a user without admin role, create a project and get back to update it.
this operation would cause his own project disappeared.

step to reproduce:
#1:

login with AUTHOR account, create a project named test_project_by_author_permission.
and just click Create Project button.

mysql> SELECT * FROM projects;
+----+-----------------------------------+---------------------+---------------------+-----------+-------------------------------+
| id | name                              | created_at          | updated_at          | client_id | report_template_properties_id |
+----+-----------------------------------+---------------------+---------------------+-----------+-------------------------------+
| 71 | test_project_by_author_permission | 2016-09-17 06:28:28 | 2016-09-17 06:28:28 |      NULL |                          NULL |
+----+-----------------------------------+---------------------+---------------------+-----------+-------------------------------+
1 row in set (0.00 sec)

mysql> SELECT * FROM permissions;
+-----+-------+---------+-------------+-----------+---------------------+---------------------+
| id  | name  | user_id | entity_type | entity_id | created_at          | updated_at          |
+-----+-------+---------+-------------+-----------+---------------------+---------------------+
| 122 | owner |       3 | Project     |        71 | 2016-09-17 06:28:28 | 2016-09-17 06:28:28 |
+-----+-------+---------+-------------+-----------+---------------------+---------------------+
1 row in set (0.00 sec)

#2:

now click Edit button and replace its name to test_project_updated.
and you will notice that project got disappeared when you click Update Project button.

mysql> SELECT * FROM projects;
+----+----------------------+---------------------+---------------------+-----------+-------------------------------+
| id | name                 | created_at          | updated_at          | client_id | report_template_properties_id |
+----+----------------------+---------------------+---------------------+-----------+-------------------------------+
| 71 | test_project_updated | 2016-09-17 06:28:28 | 2016-09-17 06:29:08 |      NULL |                          NULL |
+----+----------------------+---------------------+---------------------+-----------+-------------------------------+
1 row in set (0.00 sec)

mysql> SELECT * FROM permissions;
Empty set (0.00 sec)

mysql>
@etdsoft

This comment has been minimized.

Copy link
Contributor

commented Sep 21, 2016

I can confirm this as a real bug affecting v2.4 with the steps to reproduce shown above.

It seems related to the changes made to address #315.

Trying to find a solution for the problem.

@etdsoft etdsoft added the bug label Sep 21, 2016
@etdsoft etdsoft added this to the v2.5 milestone Nov 28, 2016
@etdsoft etdsoft closed this Nov 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.