settings-pro-AccessControl-vue.js 4.21 KB
(window["aioseopjsonp"]=window["aioseopjsonp"]||[]).push([["settings-pro-AccessControl-vue"],{"4d07":function(t,s,e){"use strict";e.r(s);var i=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"aioseo-access-control"},[e("core-card",{attrs:{slug:"accessControl"},scopedSlots:t._u([{key:"header",fn:function(){return[t._v(" "+t._s(t.strings.accessControl)+" "),e("core-pro-badge")]},proxy:!0},{key:"tooltip",fn:function(){return[t._v(" "+t._s(t.strings.tooltip)+" ")]},proxy:!0}])},[t._l(t.getRoles,(function(s){return[t.canShowRole(s)?e("core-settings-row",{key:s.name,attrs:{name:s.label},scopedSlots:t._u([{key:"content",fn:function(){return[e("core-access-control-options",{attrs:{roleSettings:t.getSettings(s)},scopedSlots:t._u([{key:"description",fn:function(){return[e("p",{staticClass:"aioseo-description",domProps:{innerHTML:t._s(s.description)}})]},proxy:!0}],null,!0),model:{value:t.getSettings(s).useDefault,callback:function(e){t.$set(t.getSettings(s),"useDefault",e)},expression:"getSettings(role).useDefault"}})]},proxy:!0}],null,!0)}):t._e()]}))],2)],1)},o=[],n=e("5530"),a=(e("b0c0"),e("caad"),e("ac1f"),e("5319"),e("9155")),r=e("2f62"),c={mixins:[a["a"]],computed:Object(n["a"])({},Object(r["e"])(["options","dynamicOptions"])),methods:{canShowRole:function(t){var s=t.name;return"administrator"!==s?(["seoManager","seoEditor"].includes(s)&&(s=s.replace("seo","aioseo_").toLowerCase()),s in this.$aioseo.user.roles):this.$aioseo.data.multisite},getSettings:function(t){return t.dynamic?this.dynamicOptions.accessControl[t.name]:this.options.accessControl[t.name]}}},l=c,d=(e("7214"),e("2877")),u=Object(d["a"])(l,i,o,!1,null,null,null);s["default"]=u.exports},"5acb":function(t,s,e){},7214:function(t,s,e){"use strict";e("5acb")},9155:function(t,s,e){"use strict";e.d(s,"a",(function(){return n}));var i=e("5530"),o=(e("99af"),e("d81d"),e("b64b"),e("2f62")),n={data:function(){return{roles:[{label:this.$t.__("Administrator",this.$td),name:"administrator",description:this.$t.sprintf(this.$t.__("By default Admins have access to %1$sall SEO site settings%2$s",this.$td),"<strong>","</strong>")},{label:this.$t.__("Editor",this.$td),name:"editor",description:this.$t.sprintf(this.$t.__("By default Editors have access to %1$sSEO settings for General Settings, Search Appearance and Social Networks, as well as all settings for individual pages and posts.%2$s",this.$td),"<strong>","</strong>")},{label:this.$t.__("Author",this.$td),name:"author",description:this.$t.sprintf(this.$t.__("By default Authors have access to %1$sSEO settings for individual pages and posts that they already have permission to edit.%2$s",this.$td),"<strong>","</strong>")},{label:this.$t.__("Contributor",this.$td),name:"contributor",description:this.$t.sprintf(this.$t.__("By default Contributors have access to %1$sSEO settings for individual pages and posts that they already have permission to edit.%2$s",this.$td),"<strong>","</strong>")},{label:this.$t.__("SEO Manager",this.$td),name:"seoManager",description:this.$t.sprintf(this.$t.__("By default SEO Managers have access to %1$sSEO settings for General Settings, Redirections, and individual pages and posts.%2$s",this.$td),"<strong>","</strong>")},{label:this.$t.__("SEO Editor",this.$td),name:"seoEditor",description:this.$t.sprintf(this.$t.__("By default SEO Editors have access to %1$sSEO settings for individual pages and posts.%2$s",this.$td),"<strong>","</strong>")}],strings:{tooltip:this.$t.sprintf(this.$t.__("By default, only users with an Administrator role have permission to manage %1$s within your WordPress admin area. With Access Controls, though, you can easily extend specific access permissions to other user roles.",this.$td),"All in One SEO"),accessControl:this.$t.__("Access Control Settings",this.$td),useDefaultSettings:this.$t.__("Use Default Settings",this.$td)}}},computed:Object(i["a"])(Object(i["a"])({},Object(o["c"])(["settings"])),{},{getRoles:function(){var t=this;return this.roles.concat(Object.keys(this.$aioseo.user.customRoles).map((function(s){return{label:t.$aioseo.user.roles[s],name:s,description:t.$t.sprintf(t.$t.__("By default the %1$s role %2$shas no access%3$s to %4$s settings.",t.$td),t.$aioseo.user.roles[s],"<strong>","</strong>","All in One SEO"),dynamic:!0}})))}})}}}]);