roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r471950 - in /incubator/roller/trunk/src/org/apache/roller/ui: core/tags/menu/EditorNavigationBarTag.java rendering/model/UtilitiesModel.java rendering/velocity/deprecated/OldWeblogPageModel.java
Date Tue, 07 Nov 2006 00:37:43 GMT
Author: agilliland
Date: Mon Nov  6 16:37:42 2006
New Revision: 471950

URL: http://svn.apache.org/viewvc?view=rev&rev=471950
Log:
fixing a few null pointers which are now more likely to happen since we are trying to limit
session creation for weblog urls.


Modified:
    incubator/roller/trunk/src/org/apache/roller/ui/core/tags/menu/EditorNavigationBarTag.java
    incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java
    incubator/roller/trunk/src/org/apache/roller/ui/rendering/velocity/deprecated/OldWeblogPageModel.java

Modified: incubator/roller/trunk/src/org/apache/roller/ui/core/tags/menu/EditorNavigationBarTag.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/core/tags/menu/EditorNavigationBarTag.java?view=diff&rev=471950&r1=471949&r2=471950
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/ui/core/tags/menu/EditorNavigationBarTag.java
(original)
+++ incubator/roller/trunk/src/org/apache/roller/ui/core/tags/menu/EditorNavigationBarTag.java
Mon Nov  6 16:37:42 2006
@@ -46,7 +46,7 @@
             HttpServletRequest request =
                     (HttpServletRequest)pageContext.getRequest();
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isGlobalAdminUser() ) {
+            if ( rollerSession != null && rollerSession.isGlobalAdminUser() ) {
                 return super.doEndTag(pw);
             } else {
                 return EVAL_PAGE;

Modified: incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java?view=diff&rev=471950&r1=471949&r2=471950
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/ui/rendering/model/UtilitiesModel.java Mon
Nov  6 16:37:42 2006
@@ -120,7 +120,7 @@
     public boolean isUserAuthorizedToAuthor(WebsiteDataWrapper weblog) {
         try {
             RollerSession rses = RollerSession.getRollerSession(request);
-            if (rses.getAuthenticatedUser() != null) {
+            if (rses != null && rses.getAuthenticatedUser() != null) {
                 return rses.isUserAuthorizedToAuthor(weblog.getPojo());
             }
         } catch (Exception e) {
@@ -132,7 +132,7 @@
     public boolean isUserAuthorizedToAdmin(WebsiteDataWrapper weblog) {
         try {
             RollerSession rses = RollerSession.getRollerSession(request);
-            if (rses.getAuthenticatedUser() != null) {
+            if (rses != null && rses.getAuthenticatedUser() != null) {
                 return rses.isUserAuthorizedToAdmin(weblog.getPojo());
             }
         } catch (Exception e) {

Modified: incubator/roller/trunk/src/org/apache/roller/ui/rendering/velocity/deprecated/OldWeblogPageModel.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/ui/rendering/velocity/deprecated/OldWeblogPageModel.java?view=diff&rev=471950&r1=471949&r2=471950
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/ui/rendering/velocity/deprecated/OldWeblogPageModel.java
(original)
+++ incubator/roller/trunk/src/org/apache/roller/ui/rendering/velocity/deprecated/OldWeblogPageModel.java
Mon Nov  6 16:37:42 2006
@@ -722,7 +722,7 @@
         try {
             RollerSession rses =
                     RollerSession.getRollerSession(mRequest);
-            if (rses.getAuthenticatedUser() != null && mWebsite != null) {
+            if (rses != null && rses.getAuthenticatedUser() != null && mWebsite
!= null) {
                 return rses.isUserAuthorizedToAuthor(mWebsite);
             }
         } catch (Exception e) {
@@ -737,7 +737,7 @@
         try {
             RollerSession rses =
                     RollerSession.getRollerSession(mRequest);
-            if (rses.getAuthenticatedUser() != null && mWebsite != null) {
+            if (rses != null && rses.getAuthenticatedUser() != null && mWebsite
!= null) {
                 return rses.isUserAuthorizedToAdmin(mWebsite);
             }
         } catch (Exception e) {



Mime
View raw message