Selective AddinCommandBinding blocking?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
so Im trying to lock some of revits commands selectivly depending what user is pushing the buttons.
I know how to lock them using the executed event of the commandbinding. However how can I let it be when the "right" user comes?
I've tried to unsubscribe to the executed event when during the BeforeExecuted event, but it seems like that is too late.
Is there a way to just say "as-you-were" in my executed event handler when I just want it to execute normally?
This is also relevant when the user changes document to a document that I dont want to limit to the users...
I guess I could use Jeremy Tammiks implementation of the active document changed event, but isnt there a more elegant way of allowing it to run?
Another idea is that I dont subscribe to the event at all for the users that are allowed.
But I want the allowed users to differ depending on the document... Back to active document changed?
Any thoughts?
/Erik