Ifyou want to display it on the toolbar as a 'button' add the SetPermission action as an ActionLink into the .ascx view of the document library toolbar (/Root/System/SystemPlugins/ListView/ViewFrame.ascx)
Place this into the ToolbarItemGroup control in the .ascx
<sn:ActionLinkButton ID="SetPermissionsActionLinkButton" runat="server" ActionName="SetPermissions" ContextInfoID="myContext" Text="<%$ Resources: Action, SetPermissions %>" />
If it's enough if the 'Set permissions' action is listed in the 'Actions' dropdown on the toolbar, add 'ListActions' to the Scenario field of the /Root/(apps)/GenericContent/SetPermissions.
