Skip to content

Uncomment specifyuser_spprincipal usage#7868

Merged
grantfitzsimmons merged 4 commits intov7.12.0-prereleasefrom
issue-7861-1
Apr 9, 2026
Merged

Uncomment specifyuser_spprincipal usage#7868
grantfitzsimmons merged 4 commits intov7.12.0-prereleasefrom
issue-7861-1

Conversation

@alesan99
Copy link
Copy Markdown
Contributor

@alesan99 alesan99 commented Mar 30, 2026

Fixes #7861

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone
  • Add pr to documentation list
  • Add automated tests

Testing instructions

  • Use a db created with the guided setup in Specify 7
  • Make sure creating a user doesn't cause a crash
  • Open up an existing database made in Specify 6 in Specify 7
  • Make sure creating a user doesn't cause a crash in Specify 7
  • Make sure creating a user in the existing DB properly creates Specify 6 permissions. You can verify this by logging into the user in Specify 6 (if you make them a manager in 7, it should work when you log into them in 6). If it works when creating it through v7.11.2, then it should work when creating it with this PR.

@alesan99 alesan99 added this to the 7.12.0 milestone Mar 30, 2026
@github-project-automation github-project-automation bot moved this to 📋Back Log in General Tester Board Mar 30, 2026
@alesan99 alesan99 changed the base branch from main to v7.12.0-prerelease March 30, 2026 19:01
@alesan99
Copy link
Copy Markdown
Contributor Author

From @grantfitzsimmons

Testing instructions

  • Use a db created with the guided setup in Specify 7

  • Make sure creating a user doesn't cause a crash

  • Open up an existing database made in Specify 6 in Specify 7

  • Make sure creating a user doesn't cause a crash in Specify 7

Using the same database I made with Specify 7:

  • Make sure creating a user properly creates Specify 6 permissions. You can verify this by logging into the user in Specify 6 (if you make them a manager in 7, it should work when you log into them in 6).

Hmm...

Image
13:54:25 DEBUG brc.util.FileCache:357 - Loading old cache mapping data from longTerm.Cache
13:54:25  WARN brc.util.FileCache:417 - Unable to locate old cache mapping file.  Building cache... 0 / 0
13:54:25 DEBUG brc.util.FileCache:520 - Cache Size: 0 / 0
13:54:25 DEBUG brc.util.FileCache:357 - Loading old cache mapping data from forms.Cache
13:54:25  WARN brc.util.FileCache:417 - Unable to locate old cache mapping file.  Building cache... 0 / 0
13:54:25 DEBUG brc.util.FileCache:520 - Cache Size: 0 / 0
13:54:27 DEBUG ui.db.PropertiesPickListAdapter:292 - Saving PickList
13:54:27 DEBUG ui.db.PropertiesPickListAdapter:296 - [login.databases][KUEntomology_2026_02_27,newdb_2026_03_30,newdb_sp6_2026_02_23,specify]
13:54:27 DEBUG ui.db.PropertiesPickListAdapter:308 - [login.databases_selected][newdb_2026_03_30]
13:54:27 DEBUG ui.db.PropertiesPickListAdapter:292 - Saving PickList
13:54:27 DEBUG ui.db.PropertiesPickListAdapter:296 - [login.servers][localhost,127.0.0.1]
13:54:27 DEBUG ui.db.PropertiesPickListAdapter:308 - [login.servers_selected][127.0.0.1]
13:54:27 DEBUG brc.ui.UIHelper:1647 - try login
13:54:27 DEBUG specify.module.DbLoginCallbackHandler:89 - handle
13:54:29 ERROR ui.db.DatabaseLoginPanel$17:1340 - com.install4j.api.launcher.SplashScreen$ConnectionException: no splash screen available
13:54:35 DEBUG specify.dbsupport.SpecifySchemaUpdateService:211 - appVerNumArg: [6.8.03] dbVersion from XML[2.10] appVersion[6.8.03] schemaVersion[2.10]  spverId[1]  recVerNum[1] 
13:54:35  INFO brc.dbsupport.HibernateUtil:198 - Using database [jdbc:mysql://127.0.0.1:3306/newdb_2026_03_30?characterEncoding=UTF-8&autoReconnect=true]
13:54:38 DEBUG brc.ui.UIHelper$1DBListener:1854 - UIHelper.doLogin[DBListener]
13:54:38 DEBUG brc.specify.Specify:2940 - loggedIn - database[newdb_2026_03_30] username[specify6]
13:54:38 DEBUG brc.specify.Specify:2474 - restartApp
13:54:38 DEBUG core.db.DBTableIdMgr:141 - Reading in datamodel file: /Applications/Specify/config/specify_datamodel.xml to create and populate DBTableMgr
13:54:38 DEBUG core.db.DBTableIdMgr:311 - Done Reading in datamodel file: /Applications/Specify/config/specify_datamodel.xml
13:54:38  WARN hibernate.util.JDBCExceptionReporter:77 - SQL Error: 1054, SQLState: 42S22
13:54:38 ERROR hibernate.util.JDBCExceptionReporter:78 - Unknown column 'division0_.divisionId' in 'SELECT'
org.hibernate.exception.SQLGrammarException: could not load an entity: [edu.ku.brc.specify.datamodel.Division#1]
	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)

newdb_2026_03_30.sql.zip

@melton-jason
Copy link
Copy Markdown
Contributor

For those which are having troubles installing or using Specify 6 and don't have access to the database, here are some steps on how to verify the Specify 6 permissions within Specify 7 using a branch I made based on this one: issue-7861-test.

On that branch, I have defined a new endpoint :/permissions/list_six_perms/<USER_ID> which can be called to retrieve the Specify 6 permissions for an associated user with the id <USER_ID>.
The return value of the endpoint is list of permissions in the form [user_name, permission_group, permission_name, permission_scope].
For this PR, you would be looking for permission_group and permission_name values that match the assigned User Group of the provided user.

For example:

Screen.Recording.2026-03-31.at.2.54.18.PM.mov

In the video I assigned the testuser user to the Full Access group, so I am expecting there to be a Specify 6 permission with Full Access in each collection (which is the case in the video).

Below is the behavior on main (where the Specify 6 permissions are not created):

Screen.Recording.2026-03-31.at.3.00.55.PM.mov

Copy link
Copy Markdown
Contributor

@kwhuber kwhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Make sure creating a user doesn't cause a crash
  • Make sure creating a user doesn't cause a crash in Specify 7

Per the testing suggestion by @melton-jason:

  • Make sure creating a user in the existing DB properly creates Specify 6 permissions. You can verify this by logging into the user in Specify 6 (if you make them a manager in 7, it should work when you log into them in 6). If it works when creating it through v7.11.2, then it should work when creating it with this PR.
Screen.Recording.2026-03-31.at.5.25.31.PM.mov

@lexiclevenger lexiclevenger requested a review from a team April 3, 2026 21:21
Copy link
Copy Markdown
Collaborator

@lexiclevenger lexiclevenger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Make sure creating a user doesn't cause a crash
  • Make sure creating a user doesn't cause a crash in Specify 7
  • Make sure creating a user in the existing DB properly creates Specify 6 permissions.

Looks good! No problems when creating users, and 6 permissions are created.

Image

Copy link
Copy Markdown
Contributor

@melton-jason melton-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Nice work, glad we caught this before the release 😌

Testing instructions

  • Use a db created with the guided setup in Specify 7
  • Make sure creating a user doesn't cause a crash
  • Open up an existing database made in Specify 6 in Specify 7
  • Make sure creating a user doesn't cause a crash in Specify 7
  • Make sure creating a user in the existing DB properly creates Specify 6 permissions. You can verify this by logging into the user in Specify 6 (if you make them a manager in 7, it should work when you log into them in 6). If it works when creating it through v7.11.2, then it should work when creating it with this PR.

@grantfitzsimmons grantfitzsimmons merged commit dd9bc63 into v7.12.0-prerelease Apr 9, 2026
14 checks passed
@grantfitzsimmons grantfitzsimmons deleted the issue-7861-1 branch April 9, 2026 20:42
@github-project-automation github-project-automation bot moved this from 📋Back Log to ✅Done in General Tester Board Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅Done

Development

Successfully merging this pull request may close these issues.

Uncomment specifyuser_spprincipal usage

5 participants