These are the two ways to hide the Site actions .
- If you want to restrict the SiteActions based on the user permission we can do via “SharePoint:SecurityTrimmingcontrol”
<Sharepoint:SPSecurityTrimmedControl runat=”server” Permissions=”AddAndCustomizePages”> SiteActions Code </Sharepoint:SPSecurityTrimmedControl>
This control Hide Ribbon for Anonymous Users – Only the editor if logged in would be able to see the ribbon.
2. Direct method to hide the SiteActions to all users including the Full Control permission users using css like below.