-
Notifications
You must be signed in to change notification settings - Fork 229
Revert to Sitemesh 2 #1144
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
Merged
Merged
Revert to Sitemesh 2 #1144
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5a7b964
test: remove unnecessary `waitFor` in Geb `at` checks
matrei 119dd6e
test: workaround issue in `buildSrc` test dependencies
matrei 0123503
fix: back to Sitemesh 2
matrei 6f10819
chore: update to Grails 7.0.0-M5
matrei 25f0255
chore: use `grails-bom` for `grails-layout`
matrei d8bcc63
chore: remove workaround for Groovy version
matrei 9304b37
test: add in-memory ldap server to test app
matrei 94831e5
build: make buildSrc testing Gradle 9 compatible
matrei 3a8c1c6
chore(build): clean up `skipTests` condition
matrei 90917e4
build: turn off `springDependencyManagement` for test apps
matrei 06d0f66
build: add Geb debug settings
matrei 5815ce2
build: update develocity plugins
matrei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,14 +19,135 @@ | |
|
|
||
| package com.test | ||
|
|
||
| import com.unboundid.ldap.listener.InMemoryDirectoryServer | ||
| import com.unboundid.ldap.listener.InMemoryDirectoryServerConfig | ||
| import com.unboundid.ldap.listener.InMemoryListenerConfig | ||
| import com.unboundid.ldap.sdk.Attribute | ||
| import com.unboundid.ldap.sdk.Entry | ||
|
|
||
| import grails.boot.GrailsApp | ||
| import grails.boot.config.GrailsAutoConfiguration | ||
|
|
||
| import groovy.transform.CompileStatic | ||
|
|
||
| @CompileStatic | ||
| class Application extends GrailsAutoConfiguration { | ||
|
|
||
| static InMemoryDirectoryServer directoryServer | ||
| static private Entry scientistsUnit | ||
|
|
||
| static void main(String[] args) { | ||
| def config = new InMemoryDirectoryServerConfig('dc=example,dc=com') | ||
| config.addAdditionalBindCredentials('cn=admin,dc=example,dc=com', 'secret') | ||
| config.setListenerConfigs( | ||
| InMemoryListenerConfig.createLDAPConfig( | ||
| 'default', | ||
| null, | ||
| 0, | ||
| null, | ||
| false, | ||
| false | ||
| ) | ||
| ) | ||
|
|
||
| directoryServer = new InMemoryDirectoryServer(config) | ||
| def base = new Entry( | ||
| 'dc=example,dc=com', | ||
| new Attribute('objectClass', 'top', 'domain'), | ||
| new Attribute('dc', 'example') | ||
| ) | ||
| directoryServer.add(base) | ||
|
|
||
| def people = new Entry( | ||
| 'ou=people,dc=example,dc=com', | ||
| new Attribute('objectClass', 'top', 'organizationalUnit'), | ||
| new Attribute('ou', 'people') | ||
| ) | ||
| directoryServer.add(people) | ||
|
|
||
| def mathematiciansUnit = new Entry( | ||
| 'ou=mathematicians,dc=example,dc=com', | ||
| new Attribute('objectClass', 'top', 'organizationalUnit'), | ||
| new Attribute('ou', 'mathematicians') | ||
| ) | ||
| directoryServer.add(mathematiciansUnit) | ||
|
|
||
| scientistsUnit = new Entry( | ||
| 'ou=scientists,dc=example,dc=com', | ||
| new Attribute('objectClass', 'top', 'organizationalUnit'), | ||
| new Attribute('ou', 'scientists') | ||
| ) | ||
| directoryServer.add(scientistsUnit) | ||
|
|
||
| def jane = new Entry( | ||
| 'uid=jane,ou=people,dc=example,dc=com', | ||
| new Attribute('objectClass', 'inetOrgPerson'), | ||
| new Attribute('uid', 'jane'), | ||
| new Attribute('cn', 'Jane Doe'), | ||
| new Attribute('sn', 'Doe'), | ||
| new Attribute('mail', '[email protected]'), | ||
| new Attribute('telephoneNumber', '+1 555 111 2222'), | ||
| new Attribute('userPassword', 'password') | ||
| ) | ||
| directoryServer.add(jane) | ||
|
|
||
| ['riemann', 'gauss', 'euler', 'euclid'].each { uid -> | ||
| directoryServer.add(new Entry( | ||
| "uid=$uid,ou=mathematicians,dc=example,dc=com" as String, | ||
| new Attribute('objectClass', 'inetOrgPerson'), | ||
| new Attribute('uid', uid), | ||
| new Attribute('cn', uid.capitalize()), | ||
| new Attribute('sn', uid.capitalize()), | ||
| new Attribute('userPassword', 'password') | ||
| )) | ||
| } | ||
|
|
||
| def mathGroup = new Entry( | ||
| 'cn=mathematicians,ou=mathematicians,dc=example,dc=com', | ||
| new Attribute('objectClass', 'top', 'groupOfUniqueNames'), | ||
| new Attribute('cn', 'mathematicians'), | ||
| new Attribute('uniqueMember', | ||
| 'uid=riemann,ou=mathematicians,dc=example,dc=com', | ||
| 'uid=gauss,ou=mathematicians,dc=example,dc=com', | ||
| 'uid=euler,ou=mathematicians,dc=example,dc=com', | ||
| 'uid=euclid,ou=mathematicians,dc=example,dc=com' | ||
| ) | ||
| ) | ||
| directoryServer.add(mathGroup) | ||
|
|
||
| ['einstein', 'newton', 'galieleo', 'tesla'].each { uid -> | ||
| directoryServer.add(new Entry( | ||
| "uid=$uid,ou=scientists,dc=example,dc=com" as String, | ||
| new Attribute('objectClass', 'inetOrgPerson'), | ||
| new Attribute('uid', uid), | ||
| new Attribute('cn', uid.capitalize()), | ||
| new Attribute('sn', uid.capitalize()), | ||
| new Attribute('userPassword', 'password') | ||
| )) | ||
| } | ||
| def scientistGroup = new Entry( | ||
| 'cn=scientists,ou=scientists,dc=example,dc=com', | ||
| new Attribute('objectClass', 'top', 'groupOfUniqueNames'), | ||
| new Attribute('cn', 'scientists'), | ||
| new Attribute('uniqueMember', | ||
| 'uid=einstein,ou=scientists,dc=example,dc=com', | ||
| 'uid=newton,ou=scientists,dc=example,dc=com', | ||
| 'uid=galieleo,ou=scientists,dc=example,dc=com', | ||
| 'uid=tesla,ou=scientists,dc=example,dc=com' | ||
| ) | ||
| ) | ||
| directoryServer.add(scientistGroup) | ||
| directoryServer.startListening() | ||
| System.setProperty('grails.test.ldap.url', "ldap://localhost:$directoryServer.listenPort") | ||
|
|
||
| GrailsApp.run(Application, args) | ||
| } | ||
|
|
||
| @Override | ||
| void onShutdown(Map<String, Object> event) { | ||
| if (directoryServer) { | ||
| directoryServer.close() | ||
| directoryServer = null | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.