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

Autoprovisioning project is not accessible #57

Open
rolnas opened this issue Feb 4, 2025 · 10 comments
Open

Autoprovisioning project is not accessible #57

rolnas opened this issue Feb 4, 2025 · 10 comments

Comments

@rolnas
Copy link

rolnas commented Feb 4, 2025

In 7.3.0 when autoprovisioning the private project is not accessible, even if an user is project administrator.
Page with message "You've either entered invalid URL or don't have enough permissions to view this page." is shown.

The same for organisation page.

@livenson
Copy link
Contributor

livenson commented Feb 4, 2025

  1. Can you please check what permissions the user has in the user profile page?
  2. Can you please check what permissions are loaded for the user roles? You can see that from network tab, from /roles requests.

@rolnas
Copy link
Author

rolnas commented Feb 4, 2025

Image

@livenson
Copy link
Contributor

livenson commented Feb 4, 2025

  1. ok, the name of the created project looks a bit ugly, of course. should we change it somehow?
  2. can you please check the /roles thing?
  3. Can you please open network tab and navigate to the link that you mentioned is broken? What url requests will return 404?

@rolnas
Copy link
Author

rolnas commented Feb 4, 2025

When I open this project link https://waldur.mif/projects/c0f3b97fbb254d3ebcfd9193e40b4915/ into another browser tab - the same error message.
If I look for projects via django admin - there are no additional projects created. So looks like project was not saved into DB.

@rolnas
Copy link
Author

rolnas commented Feb 4, 2025

No projects are shown in Projects tab for an user.

@rolnas
Copy link
Author

rolnas commented Feb 4, 2025

So role is created for non existent project.

@livenson
Copy link
Contributor

livenson commented Feb 4, 2025

ok, thanks, we'll investigate

@rolnas
Copy link
Author

rolnas commented Feb 4, 2025

Just hypothesis - because this user were many times deleted/recreated, probably it finds internally a project created on first time and use it as object but it is marked as deleted in DB.

@rolnas
Copy link
Author

rolnas commented Feb 4, 2025

I tested with another user and it works OK, so it should be related with previous (deleted) instance of an user. Some fantom user project still in DB, but reused for an user.

@rolnas
Copy link
Author

rolnas commented Feb 5, 2025

projects = structure_models.Project.objects.filter(name='f:456e9c32-e691-42b1-9d67-04ff17f81ecf:rona1043')
vars(projects[0])
{'_state': <django.db.models.base.ModelState object at 0x7f774e914210>, 'id': 3, 'created': datetime.datetime(2025, 2, 3, 11, 29, 41, 456950, tzinfo=datetime.timezone.utc), 'modified': datetime.datetime(2025, 2, 3, 11, 50, 30, 402834, tzinfo=datetime.timezone.utc), 'is_removed': True, 'image': <ImageFieldFile: None>, 'description': '', 'slug': 'f456e9c3-1', 'uuid': StringUUID('c0f3b97fbb254d3ebcfd9193e40b4915'), 'backend_id': '', 'oecd_fos_2007_code': None, 'name': 'f:456e9c32-e691-42b1-9d67-04ff17f81ecf:rona1043', 'start_date': None, 'end_date': None, 'end_date_requested_by_id': None, 'type_id': None, 'is_industry': False, 'customer_id': 2, '_tracker': <model_utils.tracker.FieldInstanceTracker object at 0x7f774e916550>, '_instance_initialized': True}

So it is really in removed state (is_removed=True).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants