I do not want the activity module to record my admin user's action like create node or update feed, can i be able to disable it from certain user/content type ? thx
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | activity.module.284750.patch | 1.03 KB | jaydub |
| #9 | nodeactivity.module.284750.patch | 842 bytes | jaydub |
Comments
Comment #1
jaydub commentedThe new 5.4 branch and the new 6.x branch have each contrib
module's activity settings displayed on their own page now reached
via the activity admin page admin/settings/activity. There are
checkboxes for each contrib module's activity token type and
activity operation types. When activity records are about to
be written a check is done to see if the relevant combination of
token type and operation type is enabled and only then is the
activity record written.
See also #237240: privacy? for privacy option which you could use to not write
activity for the admin user.
Note that you should not test this out on a production site as
many token patterns have changed and no upgrade functions
have been written at this point.
#314433: Activity 6.1 & 5.4
Comment #2
sirkitree commentedPretty much fixed I'd say.
Comment #3
mjourney2 commentedMy activity page is flooded with actions from anonymous users and I would like to disable that. Is there a way to make it so that only the activity of registered users is recorded?
Thank you
Comment #4
jaydub commentedthat's probably another good option to consider adding. I'll add it to the TODO list.
Comment #5
jaydub commentedComment #6
sirkitree commentedComment #7
jaydub commentedtagging
Comment #8
jaydub commentedThinking of this approach:
new permission of 'hide activity' which enabled for a role means that the user's activity will not be recorded. So for anon users enabling 'hide activity' for anonymous role will stop that activity from being recorded.
Comment #9
jaydub commentedFor sirkitree to review:
attached patch shows the changes made to activity.module and to one of the contrib modules (nodeactivity here) to add in the check for 'hide activity'. Changes to other contrib modules are similar.
Comment #10
sirkitree commentedI don't think the extra function is really needed.
Simply do this in nodeactivity.module
instead of
You can search for the string
if (!user_accessin core to see this used.Comment #11
jaydub commentedyeah I'm guilty of function-itis. If the basic idea is sound, change the status to RTBC and I'll implement as in #10
Comment #12
sirkitree commentedComment #13
jaydub commentedadded to CVS.
Comment #14
alexking commentedIs it just me, or does this latest code make it so that it's impossible for the admin user to log activities?
That user_access call is always going to return true for an admin, right? I know this is something some people want, but it isn't very configurable, and is odd when you update and the admin user stops logging altogether.