<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.play.eco/en/index.php?action=history&amp;feed=atom&amp;title=Generic_Authorization</id>
	<title>Generic Authorization - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.play.eco/en/index.php?action=history&amp;feed=atom&amp;title=Generic_Authorization"/>
	<link rel="alternate" type="text/html" href="https://wiki.play.eco/en/index.php?title=Generic_Authorization&amp;action=history"/>
	<updated>2026-07-20T20:02:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.play.eco/en/index.php?title=Generic_Authorization&amp;diff=16604&amp;oldid=prev</id>
		<title>StalEF at 17:59, 1 April 2026</title>
		<link rel="alternate" type="text/html" href="https://wiki.play.eco/en/index.php?title=Generic_Authorization&amp;diff=16604&amp;oldid=prev"/>
		<updated>2026-04-01T17:59:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:59, 1 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{ModdingOutdated}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Modding Tutorial: Generic Authorization ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Modding Tutorial: Generic Authorization ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key playeco_wiki_en:diff:1.41:old-7555:rev-16604:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>StalEF</name></author>
	</entry>
	<entry>
		<id>https://wiki.play.eco/en/index.php?title=Generic_Authorization&amp;diff=7555&amp;oldid=prev</id>
		<title>Redwyre: Created page with &quot;{{ModdingOutdated}}  == Modding Tutorial: Generic Authorization ==  === Intro ===  Want to authorize certain players to do certain actions with your world objects or items?  W...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.play.eco/en/index.php?title=Generic_Authorization&amp;diff=7555&amp;oldid=prev"/>
		<updated>2021-07-04T16:52:45Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{ModdingOutdated}}  == Modding Tutorial: Generic Authorization ==  === Intro ===  Want to authorize certain players to do certain actions with your world objects or items?  W...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{ModdingOutdated}}&lt;br /&gt;
&lt;br /&gt;
== Modding Tutorial: Generic Authorization ==&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
Want to authorize certain players to do certain actions with your world objects or items?  We added the AuthorizationController just for that!  It&amp;#039;s the same one we use for all the current content and is easy to use in your own mods.  &lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
Include:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    using Eco.Gameplay.Buildings&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create an *AuthorizationController* in your world object or item class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    [DataMember]&lt;br /&gt;
    public AuthorizationController Authorization { get; private set; }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initialize it in the constructor:  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    this.Authorization = new AuthorizationController();&lt;br /&gt;
    this.Authorization.AddAuthorizedPlayer(playerCreator);&lt;br /&gt;
    this.Authorization.Name = &amp;quot;Some Default Name&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Open the Authorization UI === &lt;br /&gt;
&lt;br /&gt;
Whenever you want to toggle the visibility of the authorization manager UI (for example, on left click), call:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    this.Authorization.OpenAuthorizationMenuOn(player);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Check If a Player Is Authorized: === &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    if (this.Authorization.IsAuthorized(player))&lt;br /&gt;
        // do something&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== That&amp;#039;s it! === &lt;br /&gt;
&lt;br /&gt;
Feel free to have multiple AuthorizationControllers for a single object if you wish to have different auth for various actions.&lt;br /&gt;
&lt;br /&gt;
=== Full API for AuthorizationController === &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    public List&amp;lt;string&amp;gt; AuthorizedUsers { get; set; } = new List&amp;lt;string&amp;gt;();&lt;br /&gt;
    public string Name { get; set;}&lt;br /&gt;
    &lt;br /&gt;
    public bool IsAuthorized(Player player)&lt;br /&gt;
    public bool AddAuthorizedPlayer(Player player)&lt;br /&gt;
    public bool AddAuthorizedUser(ServerUser user)&lt;br /&gt;
    public bool RemoveAuthorizedUser(ServerUser user)&lt;br /&gt;
    public bool RemoveAuthorizedPlayer(Player player)&lt;br /&gt;
    public void OpenAuthorizationMenuOn(Player player)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Modding]]&lt;/div&gt;</summary>
		<author><name>Redwyre</name></author>
	</entry>
</feed>