Skip to content

Commit 04b51ff

Browse files
committed
cleaning up security bridge for grails3
1 parent 5db467a commit 04b51ff

File tree

5 files changed

+26
-25
lines changed

5 files changed

+26
-25
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ build/
44
.gradle/
55
log/
66
plugin.xml
7-
gradle.properties
87
settings.gradle
98
*.zip

application.properties

Lines changed: 0 additions & 4 deletions
This file was deleted.

build.gradle

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,28 @@ buildscript {
88
}
99
dependencies {
1010
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
11-
classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.1.1'
1211
}
1312
}
1413

1514
plugins {
1615
id "io.spring.dependency-management" version "0.3.1.RELEASE"
17-
id "com.jfrog.bintray" version "1.1"
16+
id "com.jfrog.bintray" version "1.6"
1817
}
1918

20-
grailsVersion=3.0.0.M2
21-
gradleWrapperVersion=2.3
22-
23-
version "0.1-SNAPSHOT"
24-
group "org.grails.plugins"
19+
version "3.0.0"
20+
group "com.bertramlabs.plugins"
2521

2622
apply plugin: "spring-boot"
27-
apply plugin: "asset-pipeline"
2823
apply plugin: "org.grails.grails-plugin"
2924
apply plugin: "org.grails.grails-gsp"
3025
apply plugin: 'maven-publish'
3126
apply plugin: 'eclipse'
3227
apply plugin: 'idea'
28+
apply plugin: "org.grails.grails-plugin"
29+
apply plugin: "org.grails.grails-plugin-publish"
3330
// Used for publishing to central repository, remove if not needed
34-
apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/grailsCentralPublishing.gradle'
35-
apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/bintrayPublishing.gradle'
31+
// apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/grailsCentralPublishing.gradle'
32+
// apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/bintrayPublishing.gradle'
3633

3734
ext {
3835
grailsVersion = project.grailsVersion
@@ -71,22 +68,32 @@ dependencies {
7168
console "org.grails:grails-console"
7269
}
7370

74-
7571
bintray {
76-
if(project.hasProperty('bintrayUser')) {
77-
user = bintrayUser
78-
key = bintrayKey
79-
}
80-
8172
publications = ['maven']
8273
pkg {
74+
githubRepo = 'bertramdev/grails-security-bridge' //Optional Github repository
75+
githubReleaseNotesFile = 'README.md' //Optional Github readme file
8376
repo = 'grails3-plugins'
8477
userOrg = 'bertramlabs'
85-
name = 'security-bridge'
8678
licenses = ['Apache-2.0']
8779
}
8880
}
8981

82+
grailsPublish {
83+
if(project.hasProperty('bintrayUser')) {
84+
user = bintrayUser
85+
key = bintrayKey
86+
}
87+
userOrg = 'bertramlabs'
88+
githubSlug = 'bertramdev/grails-security-bridge'
89+
license {
90+
name = 'Apache-2.0'
91+
}
92+
title = "Security Bridge"
93+
desc = "Defines a standard corss-plugin security bridge implementation for better decoupling of authentication in plugin heavy applications."
94+
developers = [davidestes:"David Estes", jcrosbie: "Jeremy Michael Crosbie"]
95+
}
96+
9097
eclipse {
9198
classpath {
9299
plusConfigurations += [configurations.provided]

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
grailsVersion=3.1.5
2+
gradleWrapperVersion=2.12

grails-app/controllers/org/grails/plugin/securitybridge/SecurityBridgeInterceptor.groovy

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ class SecurityBridgeInterceptor {
1616
boolean before() {
1717
def controllerClass = request.getAttribute(GrailsApplicationAttributes.GRAILS_CONTROLLER_CLASS)
1818

19-
if(!controller) {
20-
return true
21-
}
2219
def action
2320
if(controllerClass) {
2421
action = controllerClass.clazz.declaredMethods.find { it.name == actionName }

0 commit comments

Comments
 (0)