You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by bd...@apache.org on 2016/12/12 21:03:41 UTC

[2/6] shiro-site git commit: Removed some duplication by using a `#lendAHandDoc()` macro

Removed some duplication by using a `#lendAHandDoc()` macro


Project: http://git-wip-us.apache.org/repos/asf/shiro-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/shiro-site/commit/fb3c1730
Tree: http://git-wip-us.apache.org/repos/asf/shiro-site/tree/fb3c1730
Diff: http://git-wip-us.apache.org/repos/asf/shiro-site/diff/fb3c1730

Branch: refs/heads/master
Commit: fb3c17304356b45eb96dffd9ad01b4ed8666a74d
Parents: e62399f
Author: Brian Demers <bd...@apache.org>
Authored: Wed Nov 23 12:30:18 2016 -0500
Committer: Brian Demers <bd...@apache.org>
Committed: Wed Nov 23 12:30:18 2016 -0500

----------------------------------------------------------------------
 architecture.md.vtl              |  8 +-------
 authentication.md.vtl            |  9 +--------
 configuration.md.vtl             |  9 +--------
 documentation.md.vtl             |  6 +-----
 guice.md.vtl                     |  7 +------
 java-authentication-guide.md.vtl |  7 +------
 java-authorization-guide.md.vtl  |  7 +------
 java-cryptography-guide.md.vtl   |  7 +------
 permissions.md                   |  7 +------
 realm.md.vtl                     |  9 +--------
 securitymanager.md.vtl           |  7 +------
 subject.md.vtl                   |  7 +------
 templates/macros/lend-a-hand.vtl | 12 ++++++++----
 testing.md.vtl                   |  7 +------
 web.md.vtl                       |  9 +--------
 15 files changed, 22 insertions(+), 96 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/architecture.md.vtl
----------------------------------------------------------------------
diff --git a/architecture.md.vtl b/architecture.md.vtl
index e6b0a97..d5c309b 100644
--- a/architecture.md.vtl
+++ b/architecture.md.vtl
@@ -102,12 +102,6 @@ The `SecurityManager` implementations and are also JavaBeans compatible, which a
 
 We will cover [Configuration](configuration.html) next.
 
-<a name="Architecture-Lendahandwithdocumentation"></a>
-#[[##Lend a hand with documentation]]#
-
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time.  If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
-
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html).
-
+#lendAHandDoc()
 
 <input type="hidden" id="ghEditPage" value="architecture.md.vtl"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/authentication.md.vtl
----------------------------------------------------------------------
diff --git a/authentication.md.vtl b/authentication.md.vtl
index c5d3d85..02f697b 100644
--- a/authentication.md.vtl
+++ b/authentication.md.vtl
@@ -27,8 +27,6 @@ Apache Shiro Authentication
         *   [Explicit Ordering](#Authentication-ExplicitOrdering)
 
 *   [Realm Authentication](#Authentication-RealmAuthentication)
-*   [Lend a hand with documentation](#Authentication-Lendahandwithdocumentation)
-
 
 <img style="margin:0px auto;display:block" src="assets/images/ShiroFeatures_Authentication.png"/>
 
@@ -307,11 +305,6 @@ Realm Authentication
 
 This chapter covers Shiro's master workflow explaining how an authentication attempt occurs. The internal workflow of what happens in a single realm as it is consulted during authentication (i.e. 'Step 5' above) is covered in the [Realm](realm.html "Realm") chapter's [Realm Authentication](realm.html#[[#]]#Realm-authentication) section.
 
-<a name="Authentication-Lendahandwithdocumentation"></a>
-Lend a hand with documentation
-------------------------------
-
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
+#lendAHandDoc()
 
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
 <input type="hidden" id="ghEditPage" value="authentication.md.vtl"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/configuration.md.vtl
----------------------------------------------------------------------
diff --git a/configuration.md.vtl b/configuration.md.vtl
index d8b29b7..fe4e288 100644
--- a/configuration.md.vtl
+++ b/configuration.md.vtl
@@ -43,8 +43,6 @@ Apache Shiro Configuration
         
         *   [`[urls]`](#Configuration-%5Curls%5C)
 
-*   [Lend a hand with documentation](#Configuration-Lendahandwithdocumentation)
-
 Shiro is designed to work in any environment, from simple command-line applications to the largest enterprise clustered applications. Because of this diversity of environments, there are a number of configuration mechanisms that are suitable for configuration. This section covers the configuration mechanisms that are supported by Shiro core only.
 
 #tip('Many Configuration Options', 'Shiro''s <code>SecurityManager</code> implementations and all supporting components are all JavaBeans compatible.  This allows Shiro to be configured with practically any configuration format such as regular Java, XML (Spring, JBoss, Guice, etc), <a class="external-link" href="http://www.yaml.org/" rel="nofollow">YAML</a>, JSON, Groovy Builder markup, and more.')
@@ -488,11 +486,6 @@ to the [`org.apache.shiro.authz.permission.WildcardPermission`](static/current/a
 
 This section and its options is described in the [Web](web.html "Web") chapter.
 
-<a name="Configuration-Lendahandwithdocumentation"></a>
-Lend a hand with documentation
-------------------------------
-
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
+#lendAHandDoc()
 
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
 <input type="hidden" id="ghEditPage" value="configuration.md.vtl"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/documentation.md.vtl
----------------------------------------------------------------------
diff --git a/documentation.md.vtl b/documentation.md.vtl
index 45ea3e2..22c983c 100644
--- a/documentation.md.vtl
+++ b/documentation.md.vtl
@@ -37,10 +37,6 @@ Apache Shiro ${latestRelease} ([Download](download.html "Download"))
 *   [Browse Source](static/${latestRelease}/xref/) (XREF)
 *   [Maven Static Site](static/${latestRelease}/)
 
-<a name="Documentation-Lendahandwithdocumentation"></a>
-#[[##Lend a hand with documentation]]#
+#lendAHandDoc()
 
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
-
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
 <input type="hidden" id="ghEditPage" value="documentation.md.vtl"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/guice.md.vtl
----------------------------------------------------------------------
diff --git a/guice.md.vtl b/guice.md.vtl
index 11e2b33..abe4cc2 100644
--- a/guice.md.vtl
+++ b/guice.md.vtl
@@ -166,11 +166,6 @@ bind(HashedCredentialsMatcher.class);
 bindConstant().annotatedWith(Names.named("shiro.hashAlgorithmName")).to(Md5Hash.ALGORITHM_NAME);
 ```
 
-<a name="Guice-Lendahandwithdocumentation"></a>
-Lend a hand with documentation
-------------------------------
+#lendAHandDoc()
 
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
-
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
 <input type="hidden" id="ghEditPage" value="guice.md.vtl"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/java-authentication-guide.md.vtl
----------------------------------------------------------------------
diff --git a/java-authentication-guide.md.vtl b/java-authentication-guide.md.vtl
index 4409553..323caf8 100644
--- a/java-authentication-guide.md.vtl
+++ b/java-authentication-guide.md.vtl
@@ -141,11 +141,6 @@ currentUser.logout(); //removes all identifying information and invalidates thei
 
 When you log out in Shiro it will close out the user session and removes any associated identity from the subject instance. If you're using RememberMe in a web environment, then `.logout()` will, by default, also delete the RememberMe cookie from the browser.
 
-<a name="JavaAuthenticationGuide-Lendahandwithdocumentation"></a>
-Lend a hand with documentation
-------------------------------
+#lendAHandDoc()
 
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
-
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
 <input type="hidden" id="ghEditPage" value="java-authentication-guide.md.vtl"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/java-authorization-guide.md.vtl
----------------------------------------------------------------------
diff --git a/java-authorization-guide.md.vtl b/java-authorization-guide.md.vtl
index 0794b4c..77e6dc6 100644
--- a/java-authorization-guide.md.vtl
+++ b/java-authorization-guide.md.vtl
@@ -224,11 +224,6 @@ Caching Authorization
 
 TBD
 
-<a name="JavaAuthorizationGuide-Lendahandwithdocumentation"></a>
-Lend a hand with documentation
-------------------------------
+#lendAHandDoc()
 
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
-
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
 <input type="hidden" id="ghEditPage" value="java-authorization-guide.md.vtl"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/java-cryptography-guide.md.vtl
----------------------------------------------------------------------
diff --git a/java-cryptography-guide.md.vtl b/java-cryptography-guide.md.vtl
index 1be3d3c..91ac6a1 100644
--- a/java-cryptography-guide.md.vtl
+++ b/java-cryptography-guide.md.vtl
@@ -100,11 +100,6 @@ new MD5Hash( aFile ).toHex();
 new Sha256(aPassword, salt, 1024).toBase64();
 ```
 
-<a name="JavaCryptographyGuide-Lendahandwithdocumentation"></a>
-Lend a hand with documentation
-------------------------------
+#lendAHandDoc()
 
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
-
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
 <input type="hidden" id="ghEditPage" value="java-cryptography-guide.md.vtl"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/permissions.md
----------------------------------------------------------------------
diff --git a/permissions.md b/permissions.md
index 2db1534..cb8fe98 100644
--- a/permissions.md
+++ b/permissions.md
@@ -277,11 +277,6 @@ This is usually extremely fast when users, roles and permissions are cached in m
 
 If a Realm implementor has a more efficient way of checking permissions and performing this implication logic, especially if based on the applicaton's data model, they should implement that as part of their Realm isPermitted* method implementations. The default Realm/WildcardPermission support exists to cover 80-90% of most use cases, but it might not be the best solution for applications that have massive amounts of permissions to store and/or check at runtime.
 
-<a name="Permissions-Lendahandwithdocumentation"></a>
-##Lend a hand with documentation
-
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
-
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
+#lendAHandDoc()
 
 <input type="hidden" id="ghEditPage" value="permissions.md"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/realm.md.vtl
----------------------------------------------------------------------
diff --git a/realm.md.vtl b/realm.md.vtl
index 5b348a6..9ed93d0 100644
--- a/realm.md.vtl
+++ b/realm.md.vtl
@@ -21,7 +21,6 @@
     *   [Disabling Authentication](#Realm-DisablingAuthentication)
 
 *   [Realm Authorization](#Realm-RealmAuthorization)
-*   [Lend a hand with documentation](#Realm-Lendahandwithdocumentation)
 
 A `Realm` is a component that can access application-specific security data such as users, roles, and permissions. The `Realm` translates this application-specific data into a format that Shiro understands so Shiro can in turn provide a single easy-to-understand [Subject](subject.html "Subject") programming API no matter how many data sources exist or how application-specific your data might be.
 
@@ -237,12 +236,6 @@ Realm Authorization
 
 TBD
 
-<a name="Realm-Lendahandwithdocumentation"></a>
-Lend a hand with documentation
-------------------------------
-
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
-
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
+#lendAHandDoc()
 
 <input type="hidden" id="ghEditPage" value="realm.md.vtl"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/securitymanager.md.vtl
----------------------------------------------------------------------
diff --git a/securitymanager.md.vtl b/securitymanager.md.vtl
index 3074758..3c48a04 100644
--- a/securitymanager.md.vtl
+++ b/securitymanager.md.vtl
@@ -74,11 +74,6 @@ Most applications instead benefit from text-based configuration that could be mo
 
 Shiro provides a simple INI-based [configuration](configuration.html "Configuration") that can be used out of the box, but any other JavaBeans-compatible mechanism can be used as well. For example, Shiro has excellent [Spring support](spring.html "Spring") too. Other similar frameworks (Guice, JBoss, etc) could also be used.
 
-<a name="SecurityManager-Lendahandwithdocumentation"></a>
-Lend a hand with documentation
-------------------------------
+#lendAHandDoc()
 
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
-
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
 <input type="hidden" id="ghEditPage" value="securitymanager.md.vtl"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/subject.md.vtl
----------------------------------------------------------------------
diff --git a/subject.md.vtl b/subject.md.vtl
index 0883de0..6a03ceb 100644
--- a/subject.md.vtl
+++ b/subject.md.vtl
@@ -319,11 +319,6 @@ Executor executor = new java.util.concurrent.Executors.newCachedThreadPool();
 
 #tip('Automatic Cleanup', 'The <code>associateWith</code>* methods perform necessary thread cleanup automatically to ensure threads remain clean in a pooled environment.')
 
-<a name="Subject-Lendahandwithdocumentation"></a>
-Lend a hand with documentation
-------------------------------
+#lendAHandDoc()
 
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
-
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
 <input type="hidden" id="ghEditPage" value="subject.md.vtl"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/templates/macros/lend-a-hand.vtl
----------------------------------------------------------------------
diff --git a/templates/macros/lend-a-hand.vtl b/templates/macros/lend-a-hand.vtl
index f734534..4bcd662 100644
--- a/templates/macros/lend-a-hand.vtl
+++ b/templates/macros/lend-a-hand.vtl
@@ -1,9 +1,13 @@
-#macro(todoAddDoc)
-<p>TODO</p>
-
+#macro(lendAHandDoc)
 <h2><a name="Lendahandwithdocumentation"></a>Lend a hand with documentation </h2>
 
 <p>While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time.  If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro. </p>
 
-<p>The easiest way to contribute your documentation is to send it to the <a class="external-link" href="http://shiro-user.582556.n2.nabble.com/" rel="nofollow">User Forum</a> or the <a href="mailing-lists.html" title="Mailing Lists">User Mailing List</a>.</p>
+<p>The easiest way to contribute your documentation is to submit a pull-request by clicking on the <code>Edit</code> link below, send it to the <a class="external-link" href="http://shiro-user.582556.n2.nabble.com/" rel="nofollow">User Forum</a> or the <a href="mailing-lists.html" title="Mailing Lists">User Mailing List</a>.</p>
+#end
+
+
+#macro(todoAddDoc)
+<p>TODO</p>
+#lendAHandDoc()
 #end
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/testing.md.vtl
----------------------------------------------------------------------
diff --git a/testing.md.vtl b/testing.md.vtl
index 32cd4d7..b5aea2e 100644
--- a/testing.md.vtl
+++ b/testing.md.vtl
@@ -244,11 +244,6 @@ Also note that the `SecurityManager` instance is set up once in a `@BeforeClass`
 
 Finally, just as with the Unit Test example, the `AbstractShiroTest` super class will clean up all Shiro artifacts (any remaining `SecurityManager` and `Subject` instance) via its `@AfterClass tearDownShiro()` method to ensure the thread is 'clean' for the next test class to run.
 
-<a name="Testing-Lendahandwithdocumentation"></a>
-Lend a hand with documentation
-------------------------------
+#lendAHandDoc()
 
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
-
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
 <input type="hidden" id="ghEditPage" value="testing.md.vtl"></input>

http://git-wip-us.apache.org/repos/asf/shiro-site/blob/fb3c1730/web.md.vtl
----------------------------------------------------------------------
diff --git a/web.md.vtl b/web.md.vtl
index 1fd4acd..db56c64 100644
--- a/web.md.vtl
+++ b/web.md.vtl
@@ -75,8 +75,6 @@ Apache Shiro Web Support
     *   [The `hasPermission` tag](#Web-The%7B%7BhasPermission%7D%7Dtag)
     *   [The `lacksPermission` tag](#Web-The%7B%7BlacksPermission%7D%7Dtag)
 
-*   [Lend a hand with documentation](#Web-Lendahandwithdocumentation)
-
 
 <a name="Web-configuration"></a>
 <a name="Web-Configuration"></a>
@@ -879,11 +877,6 @@ For example:
 
 The `lacksPermission` tag is the logical opposite of the [hasPermission](#Web-haspermissiontag) tag.
 
-<a name="Web-Lendahandwithdocumentation"></a>
-Lend a hand with documentation
-------------------------------
-
-While we hope this documentation helps you with the work you're doing with Apache Shiro, the community is improving and expanding the documentation all the time. If you'd like to help the Shiro project, please consider corrected, expanding, or adding documentation where you see a need. Every little bit of help you provide expands the community and in turn improves Shiro.
+#lendAHandDoc()
 
-The easiest way to contribute your documentation is to send it to the [User Forum](http://shiro-user.582556.n2.nabble.com/) or the [User Mailing List](mailing-lists.html "Mailing Lists").
 <input type="hidden" id="ghEditPage" value="web.md.vtl"></input>