Prepare for checking action permissions automatically, fixed changing category thumbnail - gallery ajaxpage, gallery templates