The attached patch is for the policy bug where : if a file upload policy is
allowed by admin at user level (inside web-admin) then the user should be able
to upload that file through web-access (earlier user was not able to upload
through web-access) . Pl review it .
thanks,
Anil
Index: src/webservices/UserPolicy.cs
===================================================================
--- src/webservices/UserPolicy.cs (revision 6795)
+++ src/webservices/UserPolicy.cs (working copy)
@@ -36,6 +36,7 @@
[Serializable]
public class UserPolicy
{
+ private static readonly ISimiasLog log =
SimiasLogManager.GetLogger(typeof(Member));
/// <summary>
/// The User ID
/// </summary>
Index: src/webservices/SystemPolicy.cs
===================================================================
--- src/webservices/SystemPolicy.cs (revision 6795)
+++ src/webservices/SystemPolicy.cs (working copy)
@@ -36,6 +36,8 @@
[Serializable]
public class SystemPolicy
{
+ private static readonly ISimiasLog log =
SimiasLogManagerGetLogger(typeof(Member));
+
/// <summary>
/// The Disk Space Limit for Users
/// </summary>
Index: src/core/Policy/FileTypeFilter.cs
===================================================================
--- src/core/Policy/FileTypeFilter.cs (revision 6795)
+++ src/core/Policy/FileTypeFilter.cs (working copy)
@@ -36,6 +36,7 @@
public struct FileTypeEntry
{
#region Class Members
+
/// <summary>
/// File extension to add as filter.
/// </summary>
@@ -113,7 +114,13 @@
public class FileTypeFilter
{
#region Class Members
+
/// <summary>
+ /// Used to log messages.
+ /// </summary>
+ static private readonly ISimiasLog log =
SimiasLogManagerGetLogger( typeof( Store ) );
+
+ /// <summary>
/// Well known name for the file type filter policy.
/// </summary>
static public string FileTypeFilterPolicyID =
"e69ff680-3f75-412e-a929-1b0247ed4041";
@@ -578,11 +585,12 @@
}
// See if there is a collection policy that limits the
types of files in the collection.
- if ( ( collectionPolicy != null ) && isAllowed )
+ // commented because memberPolicy always gets
preference over collectionPolicy
+ /*if ( ( collectionPolicy != null ) && isAllowed )
{
// Apply the rule to see if the file type is
allowed in the collection.
isAllowed = ( collectionPolicy.Apply( fullPath
) == Rule.Result.Allow );
- }
+ }*/
return isAllowed;
}
Index: src/core/CollectionStore/Policy.cs
===================================================================
--- src/core/CollectionStore/Policy.cs (revision 6795)
+++ src/core/CollectionStore/Policy.cs (working copy)
@@ -41,7 +41,13 @@
public class Policy : Node
{
#region Class Members
+
/// <summary>
+ /// Used to log messages.
+ /// </summary>
+ static private readonly ISimiasLog log =
SimiasLogManager.GetLogger( typeof( Store ) );
+
+ /// <summary>
/// Property names to store rules and time condition on the
policy Node.
/// </summary>
static private string RuleList = "RuleList";
@@ -395,6 +401,7 @@
/// <returns>True if the policy allows the operation, otherwise
false is returned.</returns>
public Rule.Result Apply( object input )
{
+ Rule.Result ResultValue = Rule.Result.Allow;
// Walk through the aggregate policy list in order if
it is enabled.
// Otherwise just use the current policy.
Policy[] policyArray = IsAggregate ?
aggregatePolicy.ToArray( typeof( Policy ) ) as Policy[] : new Policy[] { this };
@@ -413,20 +420,19 @@
return
Rule.Result.Allow;
}
}
-
// Check the exclude list to see if it
passes.
foreach ( Rule exclusion in
GetExclusionList( policy ) )
{
// Apply the rule to see if it
passes.
if ( exclusion.Apply( input )
== Rule.Result.Deny )
{
- return Rule.Result.Deny;
+ ResultValue =
Rule.Result.Deny;
}
}
}
}
- return Rule.Result.Allow;
+ return ResultValue;
}
/// <summary>
@@ -487,6 +493,11 @@
{
#region Class Members
/// <summary>
+ /// Used to log messages.
+ /// </summary>
+ static private readonly ISimiasLog log =
SimiasLogManager.GetLogger( typeof( Store ) );
+
+ /// <summary>
/// Store handle.
/// </summary>
private Store store;
_______________________________________________
ifolder-dev mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/ifolder-dev