Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#10364 closed (fixed)

Incorrect error message given when role does not have create database privilege

Reported by: tylere Owned by: jbronn
Component: GIS Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

If a PostGIS database role does not have sufficient permissions to create a database, the testing suite returns a misleading message similar to:

"It appears the database, test_database_name, already exists. Type 'yes' to delete it, or 'no' to cancel: "

This occurs because the _create_with_cursor() method in /django/contrib/gis/db/backend/postgis/creation.py assumes that all errors in the method are related to a non-existing test database.

Attachments (0)

Change History (5)

comment:1 Changed 5 years ago by jacob

  • milestone set to 1.1
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by russellm

  • Component changed from Testing framework to GIS

This appears to only affect GIS databases, so I'm going to punt this to Justin's bailiwick. The fix seems fairly simple - we just need to print the exception obtained so that the user gets feedback on the underlying problem. The default creation backend already does this, so it's just a matter of porting the logic to somewhere near here

comment:3 Changed 5 years ago by jbronn

  • Owner changed from nobody to jbronn

comment:4 Changed 5 years ago by jbronn

  • Resolution set to fixed
  • Status changed from new to closed

(In r10603) Fixed #10364 -- Correctly identify test spatial database creation errors to the user.

comment:5 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.