More generic activity log.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
I would like to ensure that all is logged easily. The new 1.5 loggin capability is good.

A suggestion for making it more generic could be this:

                    if (CustomerActivityManager.GetActivityTypeBySystemName("GenerateFroogle")==null)
                    {
                        CustomerActivityManager.InsertActivityType("GenerateFroogle",
                                                                   "Occurs whenever a froogle feed is sucessfully generated",
                                                                   true);
                    }

                    CustomerActivityManager.InsertActivity("GenerateFroogle", result);      


Maybe even integrate it as optional parameters in InsertActivity

with params:

string SystemKeyWord
string Comment
bool  InsertActivityLogTypeIfNotFound
string ActivityLogTypeName
string ActivityLogTypeDescription
14 years ago
Hmm also about the ACL manager.

Just to test'ive tried this.

            if (ACLManager.Enabled)
            {
                if (!ACLManager.IsActionAllowed(NopContext.Current.User.CustomerID, "GenerateFroogleFeed") && CustomerActivityManager.ActivityTypeExists("GenerateFroogleFeed"))
                {
                    lblResult.Text = "Sorry you are not allowed to generate feeds, please check your credentials";
                    return;
                }
            }


Hmm not super elegant... maybe think of a more easy way to implement it. For sure ppl would want to make audits on their own custom stuff....

BR

Chris
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.