Skip to content

Commit

Permalink
docs: update documentation
Browse files Browse the repository at this point in the history
- Fix links
- Update installation instruction
- Update landing page
  • Loading branch information
matrei committed Jan 7, 2025
1 parent 7052d4c commit 29b88b1
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 59 deletions.
2 changes: 1 addition & 1 deletion docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ tasks.register('docs') {
dependsOn('asciidoctor')
doLast {
delete file('build/docs/ghpages.html')
file('build/docs/ghpages.html') << file('src/docs/index.tmpl').text.replaceAll('@VERSION@', project.version.toString())
file('build/docs/ghpages.html') << file('src/docs/index.tmpl').text.replaceAll('@VERSION@', projectVersion)
copy {
from 'src/docs'
into 'build/docs'
Expand Down
42 changes: 10 additions & 32 deletions docs/src/docs/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,18 @@ img {
</head>

<body>
<a href="http://github.com/grails-plugins/grails-spring-security-ui">
<img style="position: absolute; top: 0; right: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" />
</a>

<a href="https://github.com/grails/grails-spring-security-ui"><img decoding="async" width="149" height="149" src="https://github.blog/wp-content/uploads/2008/12/forkme_right_green_007200.png" style="position: absolute; top: 0; right: 0;" alt="Fork me on GitHub" loading="lazy"></a>
<div id="container">
<h1>Grails Spring Security UI Plugin</h1>
<table id="properties">
<tbody>
<tr>
<td class="propName">Version</td>
<td>4.0.0.M2<td>
<td>@VERSION@<td>
</tr>
<tr>
<td class="propName">Grails Version</td>
<td>4.0.x > *</td>
<td>7.0.x > *</td>
</tr>
<tr>
<td class="propName">Author</td>
Expand All @@ -84,15 +81,17 @@ img {

<hr />

<h2>Current Documentation (4.0.x)</h2>
<h2>Current Documentation (5.0.x)</h2>
<ul>
<li><a href="/grails-spring-security-ui/4.0.x/index.html">User guide</a></li>
<li><a href="/grails-spring-security-ui/4.0.x/spring-security-ui-@VERSION@.pdf">User guide PDF</a></li>
<li><a href="/grails-spring-security-ui/4.0.x/spring-security-ui-@VERSION@.epub">User guide EPUB</a></li>
<li><a href="/grails-spring-security-ui/4.0.x/spring-security-ui-@VERSION@.mobi">User guide MOBI (Kindle)</a></li>
<li><a href="/grails-spring-security-ui/5.0.x/index.html">User guide</a></li>
</ul>


<h2>4.0.x Documentation</h2>
<ul>
<li><a href="/grails-spring-security-ui/4.0.x/index.html">User guide</a></li>
</ul>

<h2>3.0.x Documentation</h2>
<ul>
<li><a href="/grails-spring-security-ui/v3/index.html">User guide</a></li>
Expand All @@ -107,27 +106,6 @@ img {
<li><a href="/grails-spring-security-ui/v1/index.html">User guide</a></li>
</ul>

<hr />

<div class="download">
<a href="http://github.com/grails-plugins/grails-spring-security-ui/zipball/master">
<img width="90" src="http://github.com/images/modules/download/zip.png">
</a>
<a href="http://github.com/grails-plugins/grails-spring-security-ui/tarball/master">
<img width="90" src="http://github.com/images/modules/download/tar.png">
</a>
</div>

<h2>Download Source</h2>
<p>
You can download this project in either
<a href="http://github.com/grails-plugins/grails-spring-security-ui/zipball/master">zip</a> or
<a href="http://github.com/grails-plugins/grails-spring-security-ui/tarball/master">tar</a> formats.
</p>
<p>You can also clone the project with <a href="http://git-scm.com">Git</a> by running:
<pre>$ git clone git://github.com/grails-plugins/grails-spring-security-ui</pre>
</p>

</div>

<script type="text/javascript">
Expand Down
36 changes: 12 additions & 24 deletions docs/src/docs/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@

The Spring Security UI plugin provides CRUD screens and other user management workflows.

The CRUD screens are protected from cross-site request forgery (CSRF) attacks through the use of the `useToken` attribute in forms. More information is available at http://docs.grails.org/latest/guide/theWebLayer.html#formtokens.
The CRUD screens are protected from cross-site request forgery (CSRF) attacks through the use of the `useToken` attribute
in forms. For more details, refer to the
https://docs.grails.org/latest/guide/theWebLayer.html#formtokens[Handling Duplicate Form Submissions] section in the
https://docs.grails.org/latest/guide[Grails Core documentation].

Non-default functionality is available only if the feature is available; this includes the ACL controllers and views which are enabled if the http://grails.org/plugin/spring-security-acl[ACL plugin] is installed, Requestmaps support which is available if `grails.plugin.springsecurity.securityConfigType` is set to `"Requestmap"` or `SecurityConfigType.Requestmap` in `application.groovy`, and persistent cookies support which is enabled if it has been configured with the `s2-create-persistent-token` script.
Non-default functionality is available only if the feature is available. This includes:

* ACL Controllers and Views, which are enabled if the https://github.com/grails/grails-spring-security-acl[ACL Plugin] is installed.
* Requestmaps support, which is available if `grails.plugin.springsecurity.securityConfigType` is set to `"Requestmap"` or `SecurityConfigType.Requestmap` in `application.groovy`.
* Persistent cookies support, which is enabled if it has been configured with the `s2-create-persistent-token` script.

=== Installation

Expand All @@ -16,33 +22,15 @@ Add an entry in the `dependencies` block of your `build.gradle` file, changing t
[subs="attributes"]
.`build.gradle`
----
dependencies {
...
compile 'org.grails.plugins:spring-security-ui:{projectVersion}'
...
implementation 'org.grails.plugins:spring-security-ui:{projectVersion}'
----

NOTE: Master branch is for Grails 4, which uses Spring Security 5 and Spring 5
See the spring-security-core plugin for details such as how password encodings have changed (salts).

NOTE: Version 3.1.x is only compatible with Grails 3.3.x or higher.

For previous Grails 3 versions ( 3.0.x, 3.1.x and 3.2.x ) use:

[source,groovy]
[subs="attributes"]
.`build.gradle`
----
dependencies {
...
compile 'org.grails.plugins:spring-security-ui:3.0.2'
...
----

Also be sure to update the versions when new releases are available.
Also be sure to update the version when new releases are available.

=== Release History

For later releases - see the https://github.com/grails/grails-spring-security-ui/releases[GitHub release page].

* Apr 9, 2019
** 4.0.0.M1 release
* Feb 14, 2018
Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/persistentCookie.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[persistentCookie]]
== Persistent Cookie Management

Persistent cookies aren't enabled by default - you must enable them by running the `s2-create-persistent-token` script. See https://grails-plugins.github.io/grails-spring-security-core/@VERSION@/index.html#rememberMeCookie[the Spring Security Core plugin documentation] for details about this feature.
Persistent cookies aren't enabled by default - you must enable them by running the `s2-create-persistent-token` script. See the https://grails.github.io/grails-spring-security-core/latest/index.html#rememberMeCookie[Spring Security Core Plugin documentation] for details about this feature.

The Persistent Logins menu is only shown if this feature is enabled.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/user.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ image::user_edit.png[]

You can update any of the attributes or delete the User. You can see that there's a "Login as user" button here - that is only shown if you're authenticated with a User who is granted `ROLE_SWITCH_USER` (this role name can be configured in `application.groovy`):

This allows you to temporarily assume the identity of another User (see https://grails-plugins.github.io/grails-spring-security-core/@VERSION@/index.html#switchUser[the Spring Security Core plugin documentation] for more information about switch-user). The "Logged in as ..." information in the top right of the screen will change to show that you're running as another User and provide a link to switch back. The role name `ROLE_SWITCH_USER` is the default but you can change the value with the `grails.plugin.springsecurity.ui.switchUserRoleName` setting in application.groovy.
This allows you to temporarily assume the identity of another User (see https://grails-plugins.github.io/grails-spring-security-core/latest/index.html#switchUser[the Grails Spring Security Core Plugin documentation] for more information about switch-user). The "Logged in as ..." information in the top right of the screen will change to show that you're running as another User and provide a link to switch back. The role name `ROLE_SWITCH_USER` is the default but you can change the value with the `grails.plugin.springsecurity.ui.switchUserRoleName` setting in application.groovy.

If you click the Roles tab you can see the roles granted to this User and can click through to its edit page:

Expand Down

0 comments on commit 29b88b1

Please sign in to comment.