roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r226733 [1/2] - in /incubator/roller/branches/roller_2.0: metadata/database/ src/org/roller/business/hibernate/ src/org/roller/business/search/operations/ src/org/roller/model/ src/org/roller/pojos/ src/org/roller/presentation/ src/org/roll...
Date Mon, 01 Aug 2005 04:12:36 GMT
Author: snoopdave
Date: Sun Jul 31 21:12:12 2005
New Revision: 226733

URL: http://svn.apache.org/viewcvs?rev=226733&view=rev
Log:
Group blogging: support for LIMITED users

Modified:
    incubator/roller/branches/roller_2.0/metadata/database/130-to-200-migration-raw.sql
    incubator/roller/branches/roller_2.0/metadata/database/createdb-raw.sql
    incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateWeblogManagerImpl.java
    incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/RebuildWebsiteIndexOperation.java
    incubator/roller/branches/roller_2.0/src/org/roller/model/WeblogManager.java
    incubator/roller/branches/roller_2.0/src/org/roller/pojos/WeblogEntryData.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/BasePageModel.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/MainPageAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/RollerSession.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/atomapi/RollerAtomHandler.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/bookmarks/actions/BookmarksAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetConfigAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetGroupsAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetSubscriptionsAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/EditorNavigationBarTag.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/CommentServlet.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/ContextLoader.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageHelper.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageModel.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CategoriesAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CategoryDeleteAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CustomPingTargetsAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ExportEntriesAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ImportEntriesAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/PingSetupAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ReferersAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ToggleLinkbackDisplayAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogEntryFormAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogEntryPageModel.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogQueryPageModel.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/formbeans/WeblogEntryFormEx.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/BigWeblogCalendarModel.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/WeblogCalendarModel.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/CommonPingTargetsAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/MaintenanceAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/PageFormAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/RollerPropertiesAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/ThemeEditorAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/UploadFileFormAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/UserAdminAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WebsiteFormAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/xmlrpc/BloggerAPIHandler.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java
    incubator/roller/branches/roller_2.0/tests/org/roller/RollerTestBase.java
    incubator/roller/branches/roller_2.0/tests/org/roller/business/PermissionsTest.java
    incubator/roller/branches/roller_2.0/tests/org/roller/business/WeblogManagerTest.java
    incubator/roller/branches/roller_2.0/tests/org/roller/presentation/atomapi/AtomServletTest.java
    incubator/roller/branches/roller_2.0/tests/org/roller/presentation/velocity/ExportRssTest.java
    incubator/roller/branches/roller_2.0/web/WEB-INF/classes/ApplicationResources.properties
    incubator/roller/branches/roller_2.0/web/WEB-INF/classes/navbar.vm
    incubator/roller/branches/roller_2.0/web/WEB-INF/classes/weblog.vm
    incubator/roller/branches/roller_2.0/web/WEB-INF/editor-menu.xml
    incubator/roller/branches/roller_2.0/web/themes/sotto/_day.vm
    incubator/roller/branches/roller_2.0/web/weblog/WeblogEdit.jsp
    incubator/roller/branches/roller_2.0/web/weblog/WeblogEditSidebar.jsp

Modified: incubator/roller/branches/roller_2.0/metadata/database/130-to-200-migration-raw.sql
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/metadata/database/130-to-200-migration-raw.sql?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/metadata/database/130-to-200-migration-raw.sql (original)
+++ incubator/roller/branches/roller_2.0/metadata/database/130-to-200-migration-raw.sql Sun Jul 31 21:12:12 2005
@@ -25,6 +25,7 @@
 
 -- Add userid to weblogentry so we can track original creator of entry
 alter table weblogentry add column userid varchar(48) @ALTER_TABLE_NOT_NULL@;
+alter table weblogentry add column status varchar(20) @ALTER_TABLE_NOT_NULL@;
 create index weblogentry_userid_index on weblogentry(userid);
 
 alter table rolleruser add column isenabled @BOOLEAN_SQL_TYPE_TRUE@ @ALTER_TABLE_NOT_NULL@;

Modified: incubator/roller/branches/roller_2.0/metadata/database/createdb-raw.sql
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/metadata/database/createdb-raw.sql?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/metadata/database/createdb-raw.sql (original)
+++ incubator/roller/branches/roller_2.0/metadata/database/createdb-raw.sql Sun Jul 31 21:12:12 2005
@@ -177,7 +177,8 @@
     commentdays     integer default 7 not null,
     rightToLeft     @BOOLEAN_SQL_TYPE_FALSE@ not null,
     pinnedtomain    @BOOLEAN_SQL_TYPE_FALSE@ not null,
-    locale          varchar(20) null
+    locale          varchar(20) null,
+    status          varchar(20) not null
 );
 create index weblogentry_websiteid_index on weblogentry( websiteid );
 create index weblogentry_categoryid_index on weblogentry( categoryid );

Modified: incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateWeblogManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateWeblogManagerImpl.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateWeblogManagerImpl.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/business/hibernate/HibernateWeblogManagerImpl.java Sun Jul 31 21:12:12 2005
@@ -92,7 +92,7 @@
         }
         Junction conjunction = Expression.conjunction();        
         conjunction.add(Expression.eq("website", current.getWebsite()));
-        conjunction.add(Expression.eq("publishEntry", Boolean.TRUE));
+        conjunction.add(Expression.eq("status", WeblogEntryData.PUBLISHED));
         
         if (next)
         {
@@ -277,16 +277,10 @@
                 criteria.add(Expression.eq("category", cat));
             }
             
-            if (status != null && status.equals(DRAFT_ONLY))
+            if (status != null)
             {
-                criteria.add(
-                    Expression.eq("publishEntry", Boolean.FALSE));
+                criteria.add(Expression.eq("status", status));
             }        
-            else if (status != null && status.equals(PUB_ONLY))
-            {
-                criteria.add(
-                    Expression.eq("publishEntry", Boolean.TRUE));
-            }
 
             if (pinned != null)
             {
@@ -362,7 +356,7 @@
         
         Session session = ((HibernateStrategy)mStrategy).getSession();
         Criteria criteria = session.createCriteria(WeblogEntryData.class);
-        criteria.add(Expression.eq("publishEntry", Boolean.TRUE));
+        criteria.add(Expression.eq("status", WeblogEntryData.PUBLISHED));
         criteria.add(Expression.le("pubTime", new Date()));
 
         try

Modified: incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/RebuildWebsiteIndexOperation.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/RebuildWebsiteIndexOperation.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/RebuildWebsiteIndexOperation.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/business/search/operations/RebuildWebsiteIndexOperation.java Sun Jul 31 21:12:12 2005
@@ -110,7 +110,7 @@
                     null,                   // startDate
                     new Date(),             // endDate // don't index 'future' entries
                     null,                   // catName
-                    WeblogManager.PUB_ONLY, // status
+                    WeblogEntryData.PUBLISHED, // status
                     null);    
 
                 for (Iterator wbItr = entries.iterator(); wbItr.hasNext();) 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/model/WeblogManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/model/WeblogManager.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/model/WeblogManager.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/model/WeblogManager.java Sun Jul 31 21:12:12 2005
@@ -22,10 +22,6 @@
 {
     public static final String CATEGORY_ATT = "category.att";
     
-    public static final String ALL = "ALL";
-    public static final String DRAFT_ONLY = "DRAFT_ONLY";
-    public static final String PUB_ONLY = "PUB_ONLY";
-    
     public void release();
 
     //------------------------------------------------ WeblogCategoryData CRUD
@@ -167,7 +163,7 @@
      * @param startDate  Start date or null for no start date.
      * @param endDate    End date or null for no end date.
      * @param catName    Category path or null for all categories.
-     * @param status     Status of ALL, DRAFT_ONLY, or PUB_ONLY.
+     * @param status     Status of DRAFT, PENDING, PUBLISHED or null for all
      * @param offset     Index of first entry to include.
      * @param length     Max number of entries to include.
      * @return List of WeblogEntryData objects in reverse chrono order.
@@ -192,7 +188,7 @@
      * @param startDate  Start date or null for no start date.
      * @param endDate    End date or null for no end date.
      * @param catName    Category path or null for all categories.
-     * @param status     Status of ALL, DRAFT_ONLY, or PUB_ONLY.
+     * @param status     Status of DRAFT, PENDING, PUBLISHED or null for all
      * @param maxEntries Max entries or null for no limit.
      * @return Map of Lists, keyed by Date, and containing WeblogEntryData.
      * @throws RollerException
@@ -215,7 +211,7 @@
      * @param startDate  Start date or null for no start date.
      * @param endDate    End date or null for no end date.
      * @param catName    Category path or null for all categories.
-     * @param status     Status of ALL, DRAFT_ONLY, or PUB_ONLY.
+     * @param status     Status of DRAFT, PENDING, PUBLISHED or null for all
      * @param maxEntries Max entries or null for no limit.
      * @return Map of Lists, keyed by Date, and containing date strings.
      * @throws RollerException

Modified: incubator/roller/branches/roller_2.0/src/org/roller/pojos/WeblogEntryData.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/pojos/WeblogEntryData.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/pojos/WeblogEntryData.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/pojos/WeblogEntryData.java Sun Jul 31 21:12:12 2005
@@ -22,6 +22,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.roller.RollerException;
+import org.roller.model.Roller;
 import org.roller.model.RollerFactory;
 import org.roller.model.UserManager;
 import org.roller.model.WeblogManager;
@@ -46,6 +47,10 @@
                                            
     static final long serialVersionUID = 2341505386843044125L;
     
+    public static final String DRAFT = "DRAFT";
+    public static final String PENDING = "PENDING";
+    public static final String PUBLISHED = "PUBLISHED";
+    
     // Simple properies
     protected String    id            = null;
     protected String    title         = null;
@@ -54,12 +59,12 @@
     protected String    anchor        = null;
     protected Timestamp pubTime       = null;
     protected Timestamp updateTime    = null;
-    protected Boolean   publishEntry  = null;
     protected String    plugins       = null;
     protected Boolean   allowComments = Boolean.TRUE;
     protected Integer   commentDays   = new Integer(7);
     protected Boolean   rightToLeft   = Boolean.FALSE;
     protected Boolean   pinnedToMain  = Boolean.FALSE;
+    protected String    status        = DRAFT;
     
     // Associated objects
     protected UserData           creator  = null;
@@ -81,13 +86,13 @@
        WeblogCategoryData category, 
        WebsiteData website, 
        UserData creator,
-       java.lang.String title, 
-       java.lang.String link,
-       java.lang.String text, 
-       java.lang.String anchor, 
-       java.sql.Timestamp pubTime, 
-       java.sql.Timestamp updateTime, 
-       java.lang.Boolean publishEntry)
+       String title, 
+       String link,
+       String text, 
+       String anchor, 
+       Timestamp pubTime, 
+       Timestamp updateTime, 
+       String status)
     {
         this.id = id;
         this.category = category;
@@ -99,7 +104,7 @@
         this.anchor = anchor;
         this.pubTime = pubTime;
         this.updateTime = updateTime;
-        this.publishEntry = publishEntry;
+        this.status = status;
     }
 
     public WeblogEntryData(WeblogEntryData otherData)
@@ -125,7 +130,7 @@
         this.anchor = other.anchor;
         this.pubTime = other.pubTime;
         this.updateTime = other.updateTime;
-        this.publishEntry = other.publishEntry;
+        this.status = other.status;
         this.plugins = other.plugins;
         this.allowComments = other.allowComments;
         this.commentDays = other.commentDays;
@@ -373,17 +378,17 @@
 
     /** 
      * @ejb:persistent-field 
-     * @hibernate.property column="publishentry" non-null="true" unique="false"
+     * @hibernate.property column="status" non-null="true" unique="false"
      */
-    public java.lang.Boolean getPublishEntry()
+    public String getStatus()
     {
-        return this.publishEntry;
+        return this.status;
     }
 
     /** @ejb:persistent-field */
-    public void setPublishEntry(java.lang.Boolean publishEntry)
+    public void setStatus(String status)
     {
-        this.publishEntry = publishEntry;
+        this.status = status;
     }
 
     /**
@@ -507,11 +512,12 @@
         {
             setAnchor(createAnchor());
         }
-        if (getPublishEntry() != null && getPublishEntry().booleanValue()) {
+        super.save();
+        if (isPublished()) 
+        {
             // Queue applicable pings for this update.
             RollerFactory.getRoller().getAutopingManager().queueApplicableAutoPings(this);
         }
-        super.save();
     }
     
     //------------------------------------------------------------------------
@@ -762,7 +768,7 @@
                     "anchor=" + anchor + " " + 
                     "pubTime=" + pubTime + " " + 
                     "updateTime=" + updateTime + " " + 
-                    "publishEntry=" + publishEntry + " " + 
+                    "status=" + status + " " + 
                     "plugins=" + plugins);
         str.append('}');
 
@@ -851,14 +857,14 @@
                           this.updateTime.equals(lTest.updateTime);
             }
 
-            if (this.publishEntry == null)
+            if (this.status == null)
             {
-                lEquals = lEquals && (lTest.publishEntry == null);
+                lEquals = lEquals && (lTest.status == null);
             }
             else
             {
                 lEquals = lEquals && 
-                          this.publishEntry.equals(lTest.publishEntry);
+                          this.status.equals(lTest.status);
             }
 
             if (this.plugins == null)
@@ -902,7 +908,7 @@
         result = (37 * result) + 
                  ((this.updateTime != null) ? this.updateTime.hashCode() : 0);
         result = (37 * result) + 
-                 ((this.publishEntry != null) ? this.publishEntry.hashCode() : 0);
+                 ((this.status != null) ? this.status.hashCode() : 0);
         result = (37 * result) + 
                  ((this.plugins != null) ? this.plugins.hashCode() : 0);
 
@@ -1027,4 +1033,51 @@
         setCreator(umgr.retrieveUser(creatorId)); 
     }
 
+    /** Convenience method for checking status */
+    public boolean isDraft() 
+    {
+        return status.equals(DRAFT);
+    }
+    /** no-op: needed only to satisfy XDoclet, use setStatus() instead */
+    public void setDraft(boolean value)
+    {
+    }
+    
+    /** Convenience method for checking status */
+    public boolean isPending() 
+    {
+        return status.equals(PENDING);
+    }
+    /** no-op: needed only to satisfy XDoclet, use setStatus() instead */
+    public void setPending(boolean value)
+    {
+    }
+    
+    /** Convenience method for checking status */
+    public boolean isPublished() 
+    {
+        return status.equals(PUBLISHED);
+    }
+    /** no-op: needed only to satisfy XDoclet, use setStatus() instead */
+    public void setPublished(boolean value)
+    {
+    }
+    
+    public boolean canSave() throws RollerException
+    {
+        Roller roller = RollerFactory.getRoller();
+        if (roller.getUser().equals(UserData.SYSTEM_USER)) 
+        {
+            return true;
+        }
+        boolean author = getWebsite().hasUserPermissions(
+                roller.getUser(), (short)(PermissionsData.AUTHOR));
+        boolean limited = getWebsite().hasUserPermissions(
+                roller.getUser(), (short)(PermissionsData.LIMITED));
+        if (author || (limited && isDraft()) || (limited && isPending()))
+        {
+            return true;
+        }
+        return false;
+    }
 }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/BasePageModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/BasePageModel.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/BasePageModel.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/BasePageModel.java Sun Jul 31 21:12:12 2005
@@ -87,9 +87,9 @@
         return response;
     }
     
-    public boolean getIsAdmin() throws RollerException
+    public RollerSession getRollerSession()
     {
-        return RollerSession.getRollerSession(request).isAdminUser(); 
+        return RollerSession.getRollerSession(request);
     }
 
     public List getLocales()

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/MainPageAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/MainPageAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/MainPageAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/MainPageAction.java Sun Jul 31 21:12:12 2005
@@ -17,6 +17,7 @@
 import org.roller.model.Roller;
 import org.roller.model.RollerFactory;
 import org.roller.model.WeblogManager;
+import org.roller.pojos.WeblogEntryData;
 
 
 /**
@@ -121,7 +122,7 @@
                     null,                   // startDate
                     new Date(),             // endDate
                     null,                   // catName
-                    WeblogManager.PUB_ONLY, // status
+                    WeblogEntryData.PUBLISHED, // status
                     new Integer(num));       // maxEntries
                 mRecentEntries.setObject(list);
             }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/RollerSession.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/RollerSession.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/RollerSession.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/RollerSession.java Sun Jul 31 21:12:12 2005
@@ -204,16 +204,39 @@
     }
 
     /** 
-     * Is our authenticated user authorized to edit objects in the current website. 
+     * Is session's authenticated user authorized to work in current website?
      */
-    public boolean isUserAuthorizedToEdit() 
+    public boolean isUserAuthorized() 
         throws RollerException
     {
+        return hasPermissions(PermissionsData.LIMITED);
+    }
+    
+    /** 
+     * Is session's authenticated user authorized to post in current weblog?
+     */
+    public boolean isUserAuthorizedToAuthor() 
+        throws RollerException
+    {
+        return hasPermissions(PermissionsData.AUTHOR);
+    }
+    
+    /** 
+     * Is session's authenticated user authorized to admin current weblog?
+     */
+    public boolean isUserAuthorizedToAdmin() 
+        throws RollerException
+    {
+        return hasPermissions(PermissionsData.ADMIN);
+    }
+    
+    private boolean hasPermissions(short mask) 
+    {
         UserData user = getAuthenticatedUser();
         WebsiteData website = getCurrentWebsite();
         if (website != null && user != null) 
         {
-            return website.hasUserPermissions(user, (short)(PermissionsData.AUTHOR));
+            return website.hasUserPermissions(user, mask);
         }
         return false;
     }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/atomapi/RollerAtomHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/atomapi/RollerAtomHandler.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/atomapi/RollerAtomHandler.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/atomapi/RollerAtomHandler.java Sun Jul 31 21:12:12 2005
@@ -250,7 +250,7 @@
                             start,             // startDate
                             end,               // endDate
                             null,              // catName
-                            WeblogManager.ALL, // status
+                            null, // status
                             new Integer(mMaxEntries + 1)); // maxEntries
                 }
                 else
@@ -260,7 +260,7 @@
                             start,             // startDate
                             end,               // endDate
                             null,              // catName
-                            WeblogManager.ALL, // status
+                            null, // status
                             offset,            // offset (for range paging)
                             mMaxEntries + 1);  // maxEntries
                 }
@@ -888,7 +888,7 @@
         rollerEntry.setPubTime(pubTime);
         rollerEntry.setUpdateTime(updateTime);
         rollerEntry.setWebsite(website);
-        rollerEntry.setPublishEntry( Boolean.TRUE );
+        rollerEntry.setStatus(WeblogEntryData.PUBLISHED);
         rollerEntry.setCategory(website.getBloggerCategory());
         
         return rollerEntry;

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/bookmarks/actions/BookmarksAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/bookmarks/actions/BookmarksAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/bookmarks/actions/BookmarksAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/bookmarks/actions/BookmarksAction.java Sun Jul 31 21:12:12 2005
@@ -62,7 +62,7 @@
         throws RollerException
     {
         RollerRequest rreq = RollerRequest.getRollerRequest(request);
-        if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+        if (RollerSession.getRollerSession(request).isUserAuthorizedToAuthor())
         {
             addModelObjects(request, (BookmarksForm)actionForm);
             return mapping.findForward("BookmarksForm");
@@ -90,7 +90,7 @@
         throws RollerException
     {
         Roller roller = RollerFactory.getRoller();
-        if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+        if (RollerSession.getRollerSession(request).isUserAuthorizedToAuthor())
         {
             BookmarkManager bmgr = roller.getBookmarkManager();
             BookmarksForm form = (BookmarksForm)actionForm;
@@ -145,7 +145,7 @@
         ActionMessages messages = new ActionMessages();
         ActionForward forward = mapping.findForward("BookmarksForm");
         Roller roller = RollerFactory.getRoller();
-        if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+        if (RollerSession.getRollerSession(request).isUserAuthorizedToAuthor())
         {
             try 
             {

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetConfigAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetConfigAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetConfigAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetConfigAction.java Sun Jul 31 21:12:12 2005
@@ -66,7 +66,7 @@
         try
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
-            if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+            if (RollerSession.getRollerSession(request).isAdminUser())
             {
                 Roller roller = RollerFactory.getRoller();
                 PlanetManager planet = roller.getPlanetManager();
@@ -106,7 +106,7 @@
         try
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
-            if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+            if (RollerSession.getRollerSession(request).isAdminUser())
             {
                 Roller roller = RollerFactory.getRoller();
                 PlanetManager planet = roller.getPlanetManager();
@@ -160,7 +160,7 @@
         try
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
-            if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+            if (RollerSession.getRollerSession(request).isAdminUser())
             {
                 Roller roller = RollerFactory.getRoller();
                 RefreshEntriesTask task = new RefreshEntriesTask();
@@ -194,7 +194,7 @@
         try
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
-            if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+            if (RollerSession.getRollerSession(request).isAdminUser())
             {
                 Roller roller = (Roller)RollerFactory.getRoller();
                 SyncWebsitesTask task = new SyncWebsitesTask();

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetGroupsAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetGroupsAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetGroupsAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetGroupsAction.java Sun Jul 31 21:12:12 2005
@@ -69,7 +69,7 @@
         try
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
-            if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+            if (RollerSession.getRollerSession(request).isAdminUser())
             {
                 Roller roller = RollerFactory.getRoller();
                 PlanetManager planet = roller.getPlanetManager();
@@ -108,7 +108,7 @@
         ActionForward forward = mapping.findForward("planetGroups.page");
         try
         {
-            if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+            if (RollerSession.getRollerSession(request).isAdminUser())
             {
                 PlanetGroupForm form = (PlanetGroupForm)actionForm;              
                 form.doReset(mapping, request);
@@ -138,7 +138,7 @@
         try
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
-            if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+            if (RollerSession.getRollerSession(request).isAdminUser())
             {
                 Roller roller = RollerFactory.getRoller();
                 PlanetManager planet = roller.getPlanetManager();
@@ -185,7 +185,7 @@
         try
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
-            if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+            if (RollerSession.getRollerSession(request).isAdminUser())
             {
                 PlanetGroupForm form = (PlanetGroupForm)actionForm;
                 Roller roller = RollerFactory.getRoller();

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetSubscriptionsAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetSubscriptionsAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetSubscriptionsAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/planet/PlanetSubscriptionsAction.java Sun Jul 31 21:12:12 2005
@@ -70,7 +70,7 @@
         ActionForward forward = mapping.findForward("planetSubscriptions.page");
         try
         {
-            if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+            if (RollerSession.getRollerSession(request).isAdminUser())
             {
                 Roller roller = RollerFactory.getRoller();
                 PlanetManager planet = roller.getPlanetManager();
@@ -118,7 +118,7 @@
         ActionForward forward = mapping.findForward("planetSubscriptions.page");
         try
         {
-            if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+            if (RollerSession.getRollerSession(request).isAdminUser())
             {
                 Roller roller = RollerFactory.getRoller();
                 PlanetManager planet = roller.getPlanetManager();
@@ -158,7 +158,7 @@
         try
         {
             //RollerRequest rreq = RollerRequest.getRollerRequest(request);
-            if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+            if (RollerSession.getRollerSession(request).isAdminUser())
             {
                 Roller roller = RollerFactory.getRoller();
                 PlanetManager planet = roller.getPlanetManager();
@@ -225,7 +225,7 @@
 
             PlanetGroupData targetGroup = planet.getGroup(groupHandle);
 
-            if (RollerSession.getRollerSession(request).isUserAuthorizedToEdit())
+            if (RollerSession.getRollerSession(request).isAdminUser())
             {
 
                 PlanetSubscriptionData sub = null;

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/EditorNavigationBarTag.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/EditorNavigationBarTag.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/EditorNavigationBarTag.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/EditorNavigationBarTag.java Sun Jul 31 21:12:12 2005
@@ -40,7 +40,7 @@
 				(HttpServletRequest)pageContext.getRequest(); 
 			RollerRequest rreq = RollerRequest.getRollerRequest(request);
 			RollerSession rollerSession = RollerSession.getRollerSession(request);
-			if ( rollerSession.isUserAuthorizedToEdit() )
+			if ( rollerSession.isAdminUser() )
 			{
 				return super.doEndTag(pw);
 			}

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/CommentServlet.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/CommentServlet.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/CommentServlet.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/CommentServlet.java Sun Jul 31 21:12:12 2005
@@ -277,7 +277,7 @@
         manager.removeEntryIndexOperation(entry);
 
         // if published, index the entry
-        if (entry.getPublishEntry() == Boolean.TRUE)
+        if (entry.isPublished());
         {
             manager.addEntryIndexOperation(entry);
         }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/ContextLoader.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/ContextLoader.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/ContextLoader.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/ContextLoader.java Sun Jul 31 21:12:12 2005
@@ -202,23 +202,6 @@
         
         return uploadurl;
     }
-
-    //------------------------------------------------------------------------
-    
-    public boolean isUserAuthorizedToEdit()
-    {
-        try
-        {
-            RollerSession rollerSession = RollerSession.getRollerSession(
-                    mRollerReq.getRequest());
-            return rollerSession.isUserAuthorizedToEdit();
-        }
-        catch (Exception e)
-        {
-            mLogger.warn("PageHelper.isUserAuthorizedToEdit)", e);
-        }
-        return false;
-    }
     
     //------------------------------------------------------------------------
     

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageHelper.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageHelper.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageHelper.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageHelper.java Sun Jul 31 21:12:12 2005
@@ -218,7 +218,7 @@
         {
             RollerSession rollerSession = 
                 RollerSession.getRollerSession(mRollerReq.getRequest());
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAdmin() )
             {
                 Hashtable params = new Hashtable();
                 params.put( RollerRequest.REFERERID_KEY, referer.getId());
@@ -257,7 +257,7 @@
         {
             RollerSession rollerSession = 
                 RollerSession.getRollerSession(mRollerReq.getRequest());
-            return rollerSession.isUserAuthorizedToEdit();
+            return rollerSession.isUserAuthorizedToAdmin();
         }
         catch (Exception e)
         {

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageModel.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageModel.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/velocity/PageModel.java Sun Jul 31 21:12:12 2005
@@ -326,7 +326,7 @@
                             null,                     // startDate
                             day,                 // endDate
                             catParam,                 // catName
-                            WeblogManager.PUB_ONLY,   // status
+                            WeblogEntryData.PUBLISHED,   // status
                             new Integer(maxEntries)); // maxEntries
             
             setFirstAndLastEntries( ret );
@@ -421,7 +421,7 @@
                             null,                    // startDate
                             day,                      // endDate
                             catParam,                 // catName
-                            WeblogManager.PUB_ONLY,   // status
+                            WeblogEntryData.PUBLISHED,   // status
                             new Integer(maxEntries)); // maxEntries
         }
         catch (Exception e)
@@ -453,7 +453,7 @@
                     && StringUtils.isNotEmpty(excerpt) )
                 {
                     if (   referer.getVisible().booleanValue() 
-                        || rollerSession.isUserAuthorizedToEdit() )
+                        || rollerSession.isUserAuthorizedToAdmin() )
                     { 
                         referers.add(referer);
                     }
@@ -647,7 +647,7 @@
         {
             RollerSession rollerSession = 
                 RollerSession.getRollerSession(mRollerReq.getRequest());
-            return rollerSession.isUserAuthorizedToEdit();
+            return rollerSession.isUserAuthorizedToAdmin();
         }
         catch (Exception e)
         {

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CategoriesAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CategoriesAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CategoriesAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CategoriesAction.java Sun Jul 31 21:12:12 2005
@@ -62,7 +62,7 @@
         RollerRequest rreq = RollerRequest.getRollerRequest(request);
         RollerSession rollerSession = RollerSession.getRollerSession(
                 rreq.getRequest());
-        if (rollerSession.isUserAuthorizedToEdit())
+        if (rollerSession.isUserAuthorizedToAuthor())
         {
             addModelObjects(request, (CategoriesForm)actionForm);
             return mapping.findForward("CategoriesForm");
@@ -94,7 +94,7 @@
         RollerRequest rreq = RollerRequest.getRollerRequest(request);
         RollerSession rollerSession = RollerSession.getRollerSession(
                 rreq.getRequest());
-        if (rollerSession.isUserAuthorizedToEdit())
+        if (rollerSession.isUserAuthorizedToAuthor())
         {
             try 
             {

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CategoryDeleteAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CategoryDeleteAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CategoryDeleteAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CategoryDeleteAction.java Sun Jul 31 21:12:12 2005
@@ -44,7 +44,7 @@
         WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
         RollerSession rollerSession = RollerSession.getRollerSession(
                 rreq.getRequest());
-        if (rollerSession.isUserAuthorizedToEdit())
+        if (rollerSession.isUserAuthorizedToAuthor())
         {
             String catid = request.getParameter("catid");
             WeblogCategoryData catToDelete = 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CustomPingTargetsAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CustomPingTargetsAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CustomPingTargetsAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/CustomPingTargetsAction.java Sun Jul 31 21:12:12 2005
@@ -85,6 +85,6 @@
     protected boolean hasRequiredRights(RollerRequest rreq) throws RollerException
     {
         RollerSession rollerSession = RollerSession.getRollerSession(rreq.getRequest());
-        return (rollerSession.isUserAuthorizedToEdit() && !PingConfig.getDisallowCustomTargets());
+        return (rollerSession.isUserAuthorizedToAdmin() && !PingConfig.getDisallowCustomTargets());
     }
 }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ExportEntriesAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ExportEntriesAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ExportEntriesAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ExportEntriesAction.java Sun Jul 31 21:12:12 2005
@@ -88,7 +88,7 @@
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(rreq.getRequest());
-            if ( !rollerSession.isUserAuthorizedToEdit() )
+            if ( !rollerSession.isUserAuthorizedToAdmin() )
             {
                 forward = mapping.findForward("access-denied");
             }
@@ -130,7 +130,7 @@
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(rreq.getRequest());
             WeblogQueryForm form = (WeblogQueryForm)actionForm;
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAdmin() )
             {               
                 request.setAttribute("model",
                                      new BasePageModel(request, response, mapping));
@@ -164,7 +164,7 @@
                                     startDate,         // startDate
                                     endDate,           // endDate
                                     null,              // catName
-                                    WeblogManager.ALL,  // status
+                                    null,  // status
                                     null);              // maxEntries
 
                     ActionMessages messages = writeSuccessMessage(request, response, rreq, form);

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ImportEntriesAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ImportEntriesAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ImportEntriesAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ImportEntriesAction.java Sun Jul 31 21:12:12 2005
@@ -52,7 +52,7 @@
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(rreq.getRequest());
-            if ( !rollerSession.isUserAuthorizedToEdit() )
+            if ( !rollerSession.isUserAuthorizedToAdmin() )
             {
                 forward = mapping.findForward("access-denied");
             }
@@ -130,7 +130,7 @@
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(
                     rreq.getRequest());
-            if ( !rollerSession.isUserAuthorizedToEdit() )
+            if ( !rollerSession.isUserAuthorizedToAdmin() )
             {
                 forward = mapping.findForward("access-denied");
             }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/PingSetupAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/PingSetupAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/PingSetupAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/PingSetupAction.java Sun Jul 31 21:12:12 2005
@@ -320,6 +320,6 @@
     private boolean isAuthorized(RollerRequest rreq) throws RollerException
     {
         RollerSession rollerSession = RollerSession.getRollerSession(rreq.getRequest());
-        return rollerSession.isUserAuthorizedToEdit() && !PingConfig.getDisablePingUsage();
+        return rollerSession.isUserAuthorizedToAdmin() && !PingConfig.getDisablePingUsage();
     }
 }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ReferersAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ReferersAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ReferersAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ReferersAction.java Sun Jul 31 21:12:12 2005
@@ -59,7 +59,7 @@
         RefererManager refmgr = RollerFactory.getRoller().getRefererManager();
         try
         {
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAuthor() )
             {   
                 req.setAttribute("pageHits",
                     new Integer(refmgr.getDayHits(RollerSession.getRollerSession(req).getCurrentWebsite())));
@@ -90,7 +90,7 @@
         RollerSession rollerSession = RollerSession.getRollerSession(req);
         try
         {
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAuthor() )
             {
                 RefererManager refmgr = RollerFactory.getRoller().getRefererManager();
                 WebsiteData website = RollerSession.getRollerSession(req).getCurrentWebsite();
@@ -117,7 +117,7 @@
         RollerSession rollerSession = RollerSession.getRollerSession(req);
         try
         {
-            if (rollerSession.isUserAuthorizedToEdit() )
+            if (rollerSession.isUserAuthorizedToAuthor() )
             {
                 RefererManager refmgr = RollerFactory.getRoller().getRefererManager();
                 WebsiteData website = RollerSession.getRollerSession(req).getCurrentWebsite();

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ToggleLinkbackDisplayAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ToggleLinkbackDisplayAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ToggleLinkbackDisplayAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/ToggleLinkbackDisplayAction.java Sun Jul 31 21:12:12 2005
@@ -41,7 +41,7 @@
         RollerSession rollerSession = RollerSession.getRollerSession(req);
         try
         {
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAuthor() )
             {
                 String refid = req.getParameter(RollerRequest.REFERERID_KEY);
                 if ( refid != null )

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogEntryFormAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogEntryFormAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogEntryFormAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogEntryFormAction.java Sun Jul 31 21:12:12 2005
@@ -87,9 +87,8 @@
         ActionForward forward = mapping.findForward("weblogEdit.page");
         try
         {
-            RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if (rollerSession.isUserAuthorizedToEdit())
+            if (rollerSession.isUserAuthorized())
             {
                 WeblogEntryFormEx form = (WeblogEntryFormEx)actionForm; 
                 form.initNew(request, response);
@@ -129,10 +128,11 @@
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
+            WeblogEntryData entry = rreq.getWeblogEntry();
+            if (     rollerSession.isUserAuthorizedToAuthor() 
+                 || (rollerSession.isUserAuthorized() && entry.isDraft()))
             {
-                WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
-                WeblogEntryData entry = rreq.getWeblogEntry();
                 WeblogEntryFormEx form = (WeblogEntryFormEx)actionForm;
                 if (entry == null && form.getId() != null)
                 {
@@ -201,7 +201,7 @@
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAuthor() )
             {
                 request.setAttribute("model",
                    new WeblogEntryPageModel(request, response, mapping, 
@@ -236,42 +236,23 @@
         ActionMessages uiMessages = new ActionMessages();
         try
         {
-            RollerRequest rreq = RollerRequest.getRollerRequest(request);
-            RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
-            {
-                UserManager userMgr = RollerFactory.getRoller().getUserManager();
-                WeblogManager weblogMgr = RollerFactory.getRoller().getWeblogManager();
-
-                WebsiteData site = RollerSession.getRollerSession(request).getCurrentWebsite();
-                WeblogEntryFormEx wf = (WeblogEntryFormEx)actionForm;
-                
-                // I was getting column 'x' cannot be null, so I fixed it here.
-                // A better solution might be to change the table so it allows
-                // nulls for these columns.
-                if (wf.getAllowComments() == null)
-                {
-                	wf.setAllowComments(Boolean.FALSE);
-                }
-                if (wf.getRightToLeft() == null)
-                {
-                    wf.setRightToLeft(Boolean.FALSE);
-                }
-                if (wf.getPinnedToMain() == null)
-                {
-                    wf.setPinnedToMain(Boolean.FALSE);
-                }
-                if (wf.getPublishEntry() == null)
-                {
-                    wf.setPublishEntry(Boolean.FALSE);
-                }
-               
-                WeblogEntryData entry = null;
+            WeblogEntryFormEx    wf = (WeblogEntryFormEx)actionForm;
+            Roller           roller = RollerFactory.getRoller();
+            RollerSession      rses = RollerSession.getRollerSession(request);
+            UserManager     userMgr = roller.getUserManager();
+            WeblogManager weblogMgr = roller.getWeblogManager();
+            WebsiteData        site = rses.getCurrentWebsite();
+            WeblogEntryData   entry = null;
+            
+            if ( rses.isUserAuthorizedToAuthor() 
+                 || (rses.isUserAuthorized() 
+                        && !wf.getStatus().equals(WeblogEntryData.PUBLISHED) ))
+            {                             
                 if (wf.getId() == null || wf.getId().trim().length()==0) 
                 {
                     entry = new WeblogEntryData();  
                     UserData ud = userMgr.retrieveUser(
-                            RollerSession.getRollerSession(request).getAuthenticatedUser().getId());
+                            rses.getAuthenticatedUser().getId());
                     entry.setCreator(ud);
                     entry.setWebsite( site );
                 }
@@ -294,7 +275,7 @@
                 {
                    mLogger.debug("Invalid MediaCast attributes");
                 }
-                
+
                 // Store value object (creates new or updates existing)
                 entry.setUpdateTime(new Timestamp(new Date().getTime()));
                 mLogger.debug("Saving entry");
@@ -327,9 +308,18 @@
                                 (WeblogEntryFormEx)actionForm,
                                 WeblogEntryPageModel.EDIT_MODE));
                 
-                uiMessages.add(null, new ActionMessage("weblogEdit.changesSaved"));
-                saveMessages(request, uiMessages);
-                
+                if (!rses.isUserAuthorizedToAuthor() && 
+                        rses.isUserAuthorized() && entry.isPending())
+                {
+                    uiMessages.add(null, 
+                            new ActionMessage("weblogEdit.submitedForReview"));
+                }
+                else 
+                {
+                    uiMessages.add(null, 
+                            new ActionMessage("weblogEdit.changesSaved"));
+                }
+                saveMessages(request, uiMessages);               
                 mLogger.debug("operation complete");
             }
             else
@@ -427,13 +417,14 @@
         ActionForward forward = mapping.findForward("weblogEntryRemove.page");
         try
         {
-            RollerRequest rreq = RollerRequest.getRollerRequest(request);
+            Roller roller = RollerFactory.getRoller();
+            WeblogEntryFormEx wf = (WeblogEntryFormEx)actionForm;
+            WeblogEntryData wd = 
+                roller.getWeblogManager().retrieveWeblogEntry(wf.getId());
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if (     rollerSession.isUserAuthorizedToAuthor() 
+                 || (rollerSession.isUserAuthorized() && wd.isDraft()) )
             {
-                WeblogEntryFormEx wf = (WeblogEntryFormEx)actionForm;
-                WeblogEntryData wd = 
-                    RollerFactory.getRoller().getWeblogManager().retrieveWeblogEntry(wf.getId());
                 wf.copyFrom(wd, request.getLocale());
                 if (wd == null || wd.getId() == null)
                 {
@@ -468,18 +459,19 @@
     {
         try
         {
-            RollerRequest rreq = RollerRequest.getRollerRequest(request);
+            WeblogManager mgr = RollerFactory.getRoller().getWeblogManager();
+            WeblogEntryData wd = mgr.retrieveWeblogEntry(request.getParameter("id"));
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if (     rollerSession.isUserAuthorizedToAuthor() 
+                 || (rollerSession.isUserAuthorized() && wd.isDraft()) )
             {
-                WeblogManager mgr = RollerFactory.getRoller().getWeblogManager();
-                WeblogEntryData wd = mgr.retrieveWeblogEntry(request.getParameter("id"));
                 
                 // Flush the page cache
-                PageCacheFilter.removeFromCache(request, RollerSession.getRollerSession(request).getCurrentWebsite());
+                PageCacheFilter.removeFromCache(request, 
+                        RollerSession.getRollerSession(request).getCurrentWebsite());
 
 				// remove the index for it
-                wd.setPublishEntry(Boolean.FALSE);
+                wd.setStatus(WeblogEntryData.DRAFT);
 		       reindexEntry(RollerFactory.getRoller(), wd);
 
                 wd.remove();
@@ -517,7 +509,7 @@
         {
             RollerSession rollerSession = RollerSession.getRollerSession(request);
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAuthor() )
             {
                 HttpSession session = request.getSession(true);
                 WeblogEntryFormEx wf = (WeblogEntryFormEx)actionForm;
@@ -576,7 +568,7 @@
         {
             RollerSession rollerSession = RollerSession.getRollerSession(request);
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAuthor() )
             {
                 HttpSession session = request.getSession(true);
                 WeblogEntryFormEx wf = (WeblogEntryFormEx)actionForm;
@@ -627,7 +619,7 @@
         RollerSession rollerSession = RollerSession.getRollerSession(request);
         try
         {
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAuthor() )
             {
                 WeblogEntryData wd = rreq.getWeblogEntry();
                 if (wd == null || wd.getId() == null)
@@ -711,9 +703,8 @@
        WeblogEntryData entry = null;
        try
        {
-           RollerRequest rreq = RollerRequest.getRollerRequest(request);
            RollerSession rollerSession = RollerSession.getRollerSession(request);
-           if (rollerSession.isUserAuthorizedToEdit())
+           if (rollerSession.isUserAuthorizedToAuthor())
            {
                WeblogEntryFormEx form = (WeblogEntryFormEx)actionForm;
                String entryid = form.getId();
@@ -872,7 +863,7 @@
         //manager.removeEntryIndexOperation(entry); 
         
         // if published, index the entry
-        if (entry.getPublishEntry() == Boolean.TRUE) 
+        if (entry.isPublished()) 
         {
             manager.addEntryReIndexOperation(entry);
         }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogEntryPageModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogEntryPageModel.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogEntryPageModel.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogEntryPageModel.java Sun Jul 31 21:12:12 2005
@@ -116,7 +116,7 @@
                 null,              // startDate
                 null,              // endDate
                 null,              // catName
-                WeblogManager.PUB_ONLY, // status
+                WeblogEntryData.PUBLISHED, // status
                 new Integer(20));  // maxEntries
     }
 
@@ -135,10 +135,29 @@
                 null,              // startDate
                 null,              // endDate
                 null,              // catName
-                WeblogManager.DRAFT_ONLY, // status
+                WeblogEntryData.DRAFT, // status
                 new Integer(20));  // maxEntries
     }
-
+    
+    /**
+     * Get recent weblog entries using request parameters to determine
+     * username, date, and category name parameters.
+     * @return List of WeblogEntryData objects.
+     * @throws RollerException
+     */
+    public List getRecentPendingEntries() throws RollerException
+    {
+        RollerSession rollerSession = RollerSession.getRollerSession(getRequest());
+        return RollerFactory.getRoller().getWeblogManager()
+            .getWeblogEntries(
+                rollerSession.getCurrentWebsite(), 
+                null,              // startDate
+                null,              // endDate
+                null,              // catName
+                WeblogEntryData.PENDING, // status
+                new Integer(20));  // maxEntries
+    }
+ 
     public List getHoursList()
     {
         List ret = new LinkedList();

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogQueryPageModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogQueryPageModel.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogQueryPageModel.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/actions/WeblogQueryPageModel.java Sun Jul 31 21:12:12 2005
@@ -16,6 +16,7 @@
 import org.roller.model.RollerFactory;
 import org.roller.model.WeblogManager;
 import org.roller.pojos.WeblogCategoryData;
+import org.roller.pojos.WeblogEntryData;
 import org.roller.pojos.WebsiteData;
 import org.roller.presentation.BasePageModel;
 import org.roller.presentation.RollerRequest;
@@ -34,7 +35,7 @@
     private String category = null;
     private Date startDate = null;
     private Date endDate = null;
-    private String status = WeblogManager.PUB_ONLY;
+    private String status = WeblogEntryData.PUBLISHED;
     private Integer maxEntries = null;
 
     public WeblogQueryPageModel(

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/formbeans/WeblogEntryFormEx.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/formbeans/WeblogEntryFormEx.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/formbeans/WeblogEntryFormEx.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/formbeans/WeblogEntryFormEx.java Sun Jul 31 21:12:12 2005
@@ -68,6 +68,7 @@
             setPluginsArray(StringUtils.split(
                     RollerSession.getRollerSession(request).getCurrentWebsite().getDefaultPlugins(), ",") );
         }
+        status = WeblogEntryData.DRAFT;
         allowComments = Boolean.TRUE;
         updateTime = new Timestamp(new Date().getTime());
         pubTime = updateTime;
@@ -100,20 +101,26 @@
         
         entry.setPlugins( StringUtils.join(this.pluginsArray,",") );
         
-        // checkboxes don't send a value for unchecked
-        if (entry.getPublishEntry() == null)
-        {
-            entry.setPublishEntry(Boolean.FALSE);
-        }
         if (getCategoryId() != null) 
         {
             entry.setCategoryId(getCategoryId());
         }       
-        
         if (getCreatorId() != null) 
         {
             entry.setCreatorId(getCreatorId());
         }       
+        if (getAllowComments() == null)
+        {
+            entry.setAllowComments(Boolean.FALSE);
+        }
+        if (getRightToLeft() == null)
+        {
+            entry.setRightToLeft(Boolean.FALSE);
+        }
+        if (getPinnedToMain() == null)
+        {
+            entry.setPinnedToMain(Boolean.FALSE);
+        }        
         
         Iterator params = paramMap.keySet().iterator();
         while (params.hasNext())
@@ -395,6 +402,24 @@
     public void setCreatorId(String creatorId)
     {
         mCreatorId = creatorId;
+    }
+
+    /** Convenience method for checking status */
+    public boolean isDraft() 
+    {
+        return status.equals(WeblogEntryData.DRAFT);
+    }
+    
+    /** Convenience method for checking status */
+    public boolean isPending() 
+    {
+        return status.equals(WeblogEntryData.PENDING);
+    }
+    
+    /** Convenience method for checking status */
+    public boolean isPublished() 
+    {
+        return status.equals(WeblogEntryData.PUBLISHED);
     }
 }
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/BigWeblogCalendarModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/BigWeblogCalendarModel.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/BigWeblogCalendarModel.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/BigWeblogCalendarModel.java Sun Jul 31 21:12:12 2005
@@ -58,7 +58,7 @@
                             startDate,              // startDate
                             endDate,                // endDate
                             catName,                // catName
-                            WeblogManager.PUB_ONLY, // status
+                            WeblogEntryData.PUBLISHED, // status
                             null 
             );
         }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/WeblogCalendarModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/WeblogCalendarModel.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/WeblogCalendarModel.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/weblog/tags/WeblogCalendarModel.java Sun Jul 31 21:12:12 2005
@@ -16,6 +16,7 @@
 import org.roller.RollerException;
 import org.roller.model.RollerFactory;
 import org.roller.model.WeblogManager;
+import org.roller.pojos.WeblogEntryData;
 import org.roller.presentation.RollerRequest;
 import org.roller.presentation.tags.calendar.CalendarModel;
 import org.roller.util.DateUtil;
@@ -120,7 +121,7 @@
                             startDate,              // startDate
                             endDate,                // endDate
                             catName,                // catName
-                            WeblogManager.PUB_ONLY, // status
+                            WeblogEntryData.PUBLISHED, // status
                             null 
             );
         }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/CommonPingTargetsAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/CommonPingTargetsAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/CommonPingTargetsAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/CommonPingTargetsAction.java Sun Jul 31 21:12:12 2005
@@ -67,6 +67,6 @@
     {
         // This mimics the check in other admin actions, but not sure why the latter is not sufficient.
         RollerSession rollerSession = RollerSession.getRollerSession(rreq.getRequest());
-        return (rollerSession.isUserAuthorizedToEdit() && rollerSession.isAdminUser());
+        return (rollerSession.isUserAuthorizedToAdmin() && rollerSession.isAdminUser());
     }
 }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/MaintenanceAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/MaintenanceAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/MaintenanceAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/MaintenanceAction.java Sun Jul 31 21:12:12 2005
@@ -72,7 +72,7 @@
 		try
 		{
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-			if (rollerSession.isUserAuthorizedToEdit() )
+			if (rollerSession.isUserAuthorizedToAdmin() )
 			{
 				WebsiteData website = RollerSession.getRollerSession(request).getCurrentWebsite();
 				IndexManager manager = RollerFactory.getRoller().getIndexManager();
@@ -110,7 +110,7 @@
         try
         {
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-			if ( rollerSession.isUserAuthorizedToEdit() )
+			if ( rollerSession.isUserAuthorizedToAdmin() )
 			{
 	            PageCacheFilter.removeFromCache(request, RollerSession.getRollerSession(request).getCurrentWebsite());
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/PageFormAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/PageFormAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/PageFormAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/PageFormAction.java Sun Jul 31 21:12:12 2005
@@ -59,7 +59,7 @@
         try
         {
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAdmin() )
             {
                 PageForm form = (PageForm)actionForm;
                 PageData data = new PageData();
@@ -114,7 +114,7 @@
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAdmin() )
             {
                 PageData pd = rreq.getPage();
                 PageForm pf = (PageForm)actionForm;
@@ -149,7 +149,7 @@
         try
         {
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAdmin() )
             {
                 addModelObjects(request);
             }
@@ -178,7 +178,7 @@
         try
         {
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAdmin() )
             {
                 PageForm form = (PageForm)actionForm;
                 PageData data = new PageData();
@@ -227,7 +227,7 @@
         {
             RollerSession rollerSession = RollerSession.getRollerSession(request);
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAdmin() )
             {
                 PageData cd = rreq.getPage();
                 PageForm pf = (PageForm)actionForm;
@@ -261,7 +261,7 @@
         try
         {
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAdmin() )
             {
                 PageForm form = (PageForm)actionForm;
                 UserManager mgr = RollerFactory.getRoller().getUserManager();

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/RollerPropertiesAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/RollerPropertiesAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/RollerPropertiesAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/RollerPropertiesAction.java Sun Jul 31 21:12:12 2005
@@ -110,7 +110,7 @@
         try {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() && rollerSession.isAdminUser() ) {
+            if ( rollerSession.isUserAuthorizedToAdmin() && rollerSession.isAdminUser() ) {
             
                 // just grab our properties map and put it in the request
                 Roller mRoller = RollerFactory.getRoller();

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/ThemeEditorAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/ThemeEditorAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/ThemeEditorAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/ThemeEditorAction.java Sun Jul 31 21:12:12 2005
@@ -81,7 +81,7 @@
 		{
              RollerSession rollerSession = RollerSession.getRollerSession(request);
 			RollerRequest rreq = RollerRequest.getRollerRequest(request);
-			if ( rollerSession.isUserAuthorizedToEdit() )
+			if ( rollerSession.isUserAuthorizedToAdmin() )
 			{
 				loadThemes( rreq, errors, true);
 				ThemeEditorForm teForm = (ThemeEditorForm)form;
@@ -168,7 +168,7 @@
 		{
              RollerSession rollerSession = RollerSession.getRollerSession(request);
 			RollerRequest rreq = RollerRequest.getRollerRequest(request);
-			if ( rollerSession.isUserAuthorizedToEdit() )
+			if ( rollerSession.isUserAuthorizedToAdmin() )
 			{
                 HttpSession session = request.getSession();
 				ThemeEditorForm teForm = (ThemeEditorForm)form;
@@ -254,7 +254,7 @@
 		{
              RollerSession rollerSession = RollerSession.getRollerSession(request);
 			RollerRequest rreq = RollerRequest.getRollerRequest(request);
-			if ( rollerSession.isUserAuthorizedToEdit() )
+			if ( rollerSession.isUserAuthorizedToAdmin() )
 			{
                  loadThemes( rreq, errors, true);
                  ThemeEditorForm teForm = (ThemeEditorForm)form;
@@ -337,7 +337,7 @@
 		{
              RollerSession rollerSession = RollerSession.getRollerSession(request);
 			RollerRequest rreq = RollerRequest.getRollerRequest(request);
-			if ( rollerSession.isUserAuthorizedToEdit() )
+			if ( rollerSession.isUserAuthorizedToAdmin() )
 			{
 				// clear the page cache
 				WebsiteData website = RollerSession.getRollerSession(request).getCurrentWebsite();

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/UploadFileFormAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/UploadFileFormAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/UploadFileFormAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/UploadFileFormAction.java Sun Jul 31 21:12:12 2005
@@ -60,7 +60,7 @@
         {
             rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( !rollerSession.isUserAuthorizedToEdit() )
+            if ( !rollerSession.isUserAuthorizedToAuthor() )
             {
                 return mapping.findForward("access-denied");
             }
@@ -205,7 +205,7 @@
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( !rollerSession.isUserAuthorizedToEdit() )
+            if ( !rollerSession.isUserAuthorizedToAuthor() )
             {
                 return mapping.findForward("access-denied");
             }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/UserAdminAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/UserAdminAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/UserAdminAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/UserAdminAction.java Sun Jul 31 21:12:12 2005
@@ -59,7 +59,7 @@
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() && rollerSession.isAdminUser() )
+            if (rollerSession.isAdminUser() )
             {
                 UserAdminForm userForm = (UserAdminForm)actionForm;
                 UserManager mgr = RollerFactory.getRoller().getUserManager();
@@ -122,7 +122,7 @@
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() && rollerSession.isAdminUser() )
+            if (rollerSession.isAdminUser() )
             {
                 UserAdminForm userForm = (UserAdminForm)actionForm;
                 UserManager mgr = RollerFactory.getRoller().getUserManager();
@@ -233,7 +233,7 @@
 		{
 			RollerRequest rreq = RollerRequest.getRollerRequest(request);
              RollerSession rollerSession = RollerSession.getRollerSession(request);
-			if ( rollerSession.isUserAuthorizedToEdit() && rollerSession.isAdminUser() )
+			if (rollerSession.isAdminUser() )
 			{
 				UserAdminForm uaf = (UserAdminForm)actionForm;
 				

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WebsiteFormAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WebsiteFormAction.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WebsiteFormAction.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WebsiteFormAction.java Sun Jul 31 21:12:12 2005
@@ -72,7 +72,7 @@
         {
             RollerRequest rreq = RollerRequest.getRollerRequest(request);
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAdmin() )
             {
                 UserData ud = RollerSession.getRollerSession(request).getAuthenticatedUser();
                 request.setAttribute("user",ud);
@@ -127,7 +127,7 @@
             WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
             UserManager umgr = RollerFactory.getRoller().getUserManager();
             RollerSession rollerSession = RollerSession.getRollerSession(request);
-            if ( rollerSession.isUserAuthorizedToEdit() )
+            if ( rollerSession.isUserAuthorizedToAdmin() )
             {
                 WebsiteFormEx form = (WebsiteFormEx)actionForm;
                 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/xmlrpc/BloggerAPIHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/xmlrpc/BloggerAPIHandler.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/xmlrpc/BloggerAPIHandler.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/xmlrpc/BloggerAPIHandler.java Sun Jul 31 21:12:12 2005
@@ -352,7 +352,14 @@
                 WeblogEntryData entry = weblogMgr.retrieveWeblogEntry(postid);
                 entry.setText(content);
                 entry.setUpdateTime(current);
-                entry.setPublishEntry(Boolean.valueOf(publish));
+                if (Boolean.valueOf(publish).booleanValue())
+                {
+                    entry.setStatus(WeblogEntryData.PUBLISHED);
+                }
+                else
+                {
+                    entry.setStatus(WeblogEntryData.DRAFT);
+                }
     
                 entry.save();
                 roller.commit();
@@ -420,9 +427,15 @@
             entry.setPubTime(current);
             entry.setUpdateTime(current);
             entry.setWebsite(website);
-            entry.setPublishEntry(Boolean.valueOf(publish));
             entry.setCategory(website.getBloggerCategory());
-
+            if (Boolean.valueOf(publish).booleanValue())
+            {
+                entry.setStatus(WeblogEntryData.PUBLISHED);
+            }
+            else
+            {
+                entry.setStatus(WeblogEntryData.DRAFT);
+            }
             entry.save();
             roller.commit();
             flushPageCache(entry.getWebsite());
@@ -484,7 +497,7 @@
                                 null,                   // startDate
                                 new Date(),             // endDate
                                 null,                   // catName
-                                WeblogManager.ALL,      // status
+                                null,      // status
                                 new Integer(numposts)); // maxEntries 
                 
                 Iterator iter = entries.values().iterator();

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/xmlrpc/MetaWeblogAPIHandler.java Sun Jul 31 21:12:12 2005
@@ -142,7 +142,15 @@
             if ( !title.equals("") ) entry.setTitle(title);
             entry.setText(description);
             entry.setUpdateTime(current);
-            entry.setPublishEntry(Boolean.valueOf(publish));
+            if (Boolean.valueOf(publish).booleanValue())
+            {
+                entry.setStatus(WeblogEntryData.PUBLISHED);
+            }
+            else
+            {
+                entry.setStatus(WeblogEntryData.DRAFT);
+            }
+
 
             if ( cat != null )
             {
@@ -225,7 +233,15 @@
             entry.setPubTime(current);
             entry.setUpdateTime(current);
             entry.setWebsite(website);
-            entry.setPublishEntry(Boolean.valueOf(publish));
+            if (Boolean.valueOf(publish).booleanValue())
+            {
+                entry.setStatus(WeblogEntryData.PUBLISHED);
+            }
+            else
+            {
+                entry.setStatus(WeblogEntryData.DRAFT);
+            }
+
 
             if ( cat != null )
             {
@@ -390,7 +406,7 @@
                                 null,                   // startDate
                                 new Date(),             // endDate
                                 null,                   // catName
-                                WeblogManager.ALL,      // status
+                                null,      // status
                                 new Integer(numposts)); // maxEntries 
                 
                 Iterator iter = entries.values().iterator();



Mime
View raw message