rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r797167 - /websites/staging/rave/trunk/content/rave/documentation/new-model-permission-impl.html
Date Tue, 18 Oct 2011 19:39:32 GMT
Author: buildbot
Date: Tue Oct 18 19:39:31 2011
New Revision: 797167

Staging update by buildbot


Added: websites/staging/rave/trunk/content/rave/documentation/new-model-permission-impl.html
--- websites/staging/rave/trunk/content/rave/documentation/new-model-permission-impl.html
+++ websites/staging/rave/trunk/content/rave/documentation/new-model-permission-impl.html
Tue Oct 18 19:39:31 2011
@@ -0,0 +1,102 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+       http://www.apache.org/licenses/LICENSE- 2.0
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+  <link rel="shortcut icon" href="/rave/images/RAVE-icon.ico" type="image/x-icon" />
+  <link href="/rave/css/rave.css" rel="stylesheet" type="text/css">
+  <title></title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <div id="banner">
+    <img id="logo" alt="Apache Rave (Incubating)" src="/rave/images/RAVE-logo_main-logo-small.png"/>
+  </div>
+  <div id="navigation">
+  <h1 id="general">General</h1>
+<li><a href="/rave/index.html">About</a></li>
+<li><a href="/rave/documentation/index.html">Documentation</a></li>
+<li><a href="/rave/downloads.html">Downloads</a></li>
+<li><a href="http://incubator.apache.org/projects/rave.html">Incubator page</a></li>
+<li><a href="/rave/license.html">License</a></li>
+<h1 id="community">Community</h1>
+<li><a href="/rave/get-involved.html">Get Involved</a></li>
+<li><a href="/rave/mailing-lists.html">Mailing Lists</a></li>
+<li><a href="/rave/people.html">People</a></li>
+<h1 id="development">Development</h1>
+<li><a href="/rave/source.html">Getting Started</a></li>
+<li><a href="/rave/ide-settings-and-debugging.html">IDE Settings and debugging</a></li>
+<li><a href="/rave/release-management.html">Release Management</a></li>
+<li><a href="/rave/issue-management.html">Issue Tracker</a></li>
+<li><a href="https://builds.apache.org/hudson/view/M-R/view/Rave/">Continuous
+<li><a href="https://analysis.apache.org/dashboard/index/58996">Sonar Dashboard</a></li>
+<li><a href="/rave/edit-website.html">Website</a></li>
+<h1 id="asf">ASF</h1>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+    <a alt="Apache Incubator" href="http://incubator.apache.org">
+      <img id="asf-logo" alt="Apache Incubator" src="/rave/images/apache-incubator-logo.png"/>
+    </a>
+  </div>
+  <div id="content">
+    <h1 class="title"></h1>
+    <h2 id="how-to-implement-permission-security-for-a-new-rave-model-object">How to
Implement Permission Security for a new Rave Model Object</h2>
+<p><em>This how-to is targeted to Rave committers/contributors who have created
a completely new model object in Rave and want to implement permission security on it.
+For third-party developers that are customizing Rave and are interested in overriding the
default ModelPermissionEvaluator for an existing Rave model, see(PLACEHOLDER)</em></p>
+<p>1) Create a new Default[ModelName]PermissionEvaluator class in org.apache.rave.portal.security.impl
under rave-core.</p>
+<p>(a) it should extend the AbstractModelPermissionEvaluator&lt;[ModelName]&gt;</p>
+<p>(b) view the DefaultPagePermissionEvaluator class in the same package
+for an example to follow</p>
+<p>(c) override the getType() and both hasPermission() signatures. Ensure
+you follow the same trustedDomainObject pattern by looking up the
+entity from the repository if you are not guaranteed it to be trusted.</p>
+<p>(d) make sure the class is marked @Component so it is picked up by
+Spring's component scanner.  This will ensure it gets added to the
+RavePermissionEvaluator class on startup.</p>
+<p>2) Annotate the appropriate Service layer interface methods in org.apache.rave.portal.service
with the permission security expression language functions.  You can use PageService as a
good example of using both PreAuthorize and PostAuthorize, and also for situations where you
need to use a RaveSecurityContext object to check permissions against an object that is different
from the one being returned in the function.  Note that the annotations should not contain
any security-specific business logic.  The business logic should be implemented in the ModelPermissionEvaluator
implementations so that it can be overridden by third-parties. </p>
+<p>Click <a href="http://static.springsource.org/spring-security/site/docs/3.0.x/reference/el-access.html">here</a>
for more information on the Spring EL-based security functions.</p>
+  </div>
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
+        <br />
+        Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>

View raw message