jeffwils / grails-spring-security-saml

Grails Spring Security SAML2.0 Plugin for Grails 3
8 stars 25 forks source link

Inform user about potential name conflicts #45

Closed valentingoebel closed 6 years ago

valentingoebel commented 6 years ago
$> grails s2-quickstart com.jeffwils User Role

The table name "user" conflicts with the keyword "USER" in postgres and potentially other RDBMS. One workaround is to use a non conflicting table name.

   static mapping = {
        table 'users'
    }
irstevenson commented 6 years ago

Tricky one that isn't it, as it's really a Spring Security Core plugin concern, however we will have users who are using this plugin as their primary interface and it's nice to be helpful. I note that Core uses primarily the same example: https://grails-plugins.github.io/grails-spring-security-core/3.2.x/index.html#s2-quickstart

But they also provide one different example with along the lines of:

grails s2-quickstart com.yourapp Person Authority

I'd be inclined to say we should both change the command in our doco to read:

$> grails s2-quickstart com.yourapp UserAcct Role

So if people just grab the command it'll work on a higher number of DBs. Plus add a note as you mention around conflicts and how to further customise via a mapping.