{"id":282,"date":"2018-07-05T14:37:31","date_gmt":"2018-07-05T14:37:31","guid":{"rendered":"https:\/\/html5-chat.com\/blog\/?p=282"},"modified":"2018-07-05T14:37:31","modified_gmt":"2018-07-05T14:37:31","slug":"promote-users-in-real-time-and-assign-roles-per-room","status":"publish","type":"post","link":"https:\/\/html5-chat.com\/blog\/promote-users-in-real-time-and-assign-roles-per-room\/","title":{"rendered":"Promote users in real time and assign roles per room"},"content":{"rendered":"<h3>Promote users in real time and assign roles per room<\/h3>\n<p>you can assign roles per user AND per room and you can even do that in real time and be permanent or temporary.<\/p>\n<h3><a href=\"https:\/\/html5-chat.com\/blog\/wp-content\/uploads\/2018\/04\/roles-users.jpg\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-168\" src=\"https:\/\/html5-chat.com\/blog\/wp-content\/uploads\/2018\/04\/roles-users-300x127.jpg\" alt=\"roles-users\" width=\"300\" height=\"127\" srcset=\"https:\/\/html5-chat.com\/blog\/wp-content\/uploads\/2018\/04\/roles-users-300x127.jpg 300w, https:\/\/html5-chat.com\/blog\/wp-content\/uploads\/2018\/04\/roles-users.jpg 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>What you need to know<\/h3>\n<ol>\n<li>be sure guest users are disabled. (You cannot assign to guest users since they are temporary users !)<\/li>\n<li>Be sure in your role, you configure the 2 fields:<br \/>\n<strong>&#8220;canPromote&#8221;<\/strong>: this fields gives the opportunity to that role to assign roles in real time (ex: admin and moderator can promote by default. Other roles should not be able to promote)<br \/>\n<strong>&#8220;canBePromoted&#8221;<\/strong>: only these roles are eligible to be promoted (ex: admin user should not be promoted : it has already the highest possible rank !)<\/li>\n<li>You can now set a role to a specific user :<br \/>\n&#8211; you can do that within your <a href=\"\/chatadmin\">chatadmin<\/a> , in users panel<br \/>\n&#8211; You can do that in real time: click on user : you will get the contextual menu. Choose &#8220;<strong>Promote user<\/strong>&#8221; menu item.<br \/>\nyou will get the modal Box that allows to choose the user to be promoted and the list of available roles.<a href=\"https:\/\/html5-chat.com\/blog\/wp-content\/uploads\/2018\/07\/promoteUser2.jpg\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-287 alignright\" src=\"https:\/\/html5-chat.com\/blog\/wp-content\/uploads\/2018\/07\/promoteUser2-300x154.jpg\" alt=\"promoteUser2\" width=\"300\" height=\"154\" srcset=\"https:\/\/html5-chat.com\/blog\/wp-content\/uploads\/2018\/07\/promoteUser2-300x154.jpg 300w, https:\/\/html5-chat.com\/blog\/wp-content\/uploads\/2018\/07\/promoteUser2.jpg 604w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"https:\/\/html5-chat.com\/blog\/wp-content\/uploads\/2018\/07\/promoteUser.jpg\" data-rel=\"lightbox-image-2\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-286 alignright\" src=\"https:\/\/html5-chat.com\/blog\/wp-content\/uploads\/2018\/07\/promoteUser-260x300.jpg\" alt=\"promoteUser\" width=\"260\" height=\"300\" srcset=\"https:\/\/html5-chat.com\/blog\/wp-content\/uploads\/2018\/07\/promoteUser-260x300.jpg 260w, https:\/\/html5-chat.com\/blog\/wp-content\/uploads\/2018\/07\/promoteUser.jpg 303w\" sizes=\"auto, (max-width: 260px) 100vw, 260px\" \/><\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Promote users in real time and assign roles per room you can assign roles per user AND per room and you can even do that in real time and be permanent or temporary. What you need to know be sure guest users are disabled. (You cannot assign to guest users since they are temporary users [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":285,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-282","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-features"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts\/282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/comments?post=282"}],"version-history":[{"count":3,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts\/282\/revisions"}],"predecessor-version":[{"id":288,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/posts\/282\/revisions\/288"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/media\/285"}],"wp:attachment":[{"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/media?parent=282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/categories?post=282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/html5-chat.com\/blog\/wp-json\/wp\/v2\/tags?post=282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}