You need to sign in to do that
Don't have an account?
Mangesh Khapre 3
Trailhead Challenge - Secure Your Component Communication
Hi,
I am getting error as-
The 'LTNG_Access_Control_Challenge_Wrapper' component does not appear to contain the correct code to call the 'LTNG_Access_Control_Challenge' component.
I made guardAsleep private as-
<aura:component access="global">
<aura:attribute name="personQuota" access="private" type="Decimal" default="25"/>
<aura:attribute name="currentPeople" access="private" type="Decimal" default="10" />
<!-- Global may be too permissive here, private would be better since only the CEO decides commissions -->
<aura:attribute name="guardAsleep" access="private" type="Boolean" default="false" /> <!-- CHANGE 1-->
<div class="slds-row slds-align--absolute-center">
<div class="slds-panel slds-size--4-of-6">
<article class="slds-card">
<div class="slds-card__header">
Welcome to the castle. We have a strict quota of {!v.personQuota} citizens
</div>
<div class="slds-card__body">
<ui:outputNumber value="{!v.currentPeople}"/> People<br />
<ui:button press="{!c.attemptEntry}" label="Enter"/>
</div>
</article>
</div>
</div>
</aura:component>
and then commented the components in wrapper however this seems wrong to me, but it was not letting me save.
<aura:component implements="force:appHostable" access="global">
<!--<c:LTNG_Access_Control_Challenge guardAsleep="{!v.sleepingGuard}"/>-->
<div class="slds-row slds-align--absolute-center">
<div class="slds-size--3-of-6">
<div class="slds-row slds-align--absolute-center">
<div class="slds-panel slds-size--4-of-6 ">
<h2 class="slds-text-heading--medium">Welcome to the castle. Be warned, a guard will keep the castle from going over its person allocation</h2>
<ui:inputCheckbox label="Guard Asleep?" value="{!v.sleepingGuard}" />
</div>
<div class="slds-pabel slds-size--2-of-6">
<!--<c:LTNG_Access_Control_Challenge guardAsleep="{!v.sleepingGuard}"/>-->
</div>
</div>
</div>
</div>
<hr />
<div class="slds-row slds-align--absolute-center">
<div class="slds-size--4-of-6">
<c:CodeInstructions componentName="LTNG_Access_Control_Demo" />
</div>
</div>
</aura:component>
Can you please what needs to be done?
I am getting error as-
The 'LTNG_Access_Control_Challenge_Wrapper' component does not appear to contain the correct code to call the 'LTNG_Access_Control_Challenge' component.
I made guardAsleep private as-
<aura:component access="global">
<aura:attribute name="personQuota" access="private" type="Decimal" default="25"/>
<aura:attribute name="currentPeople" access="private" type="Decimal" default="10" />
<!-- Global may be too permissive here, private would be better since only the CEO decides commissions -->
<aura:attribute name="guardAsleep" access="private" type="Boolean" default="false" /> <!-- CHANGE 1-->
<div class="slds-row slds-align--absolute-center">
<div class="slds-panel slds-size--4-of-6">
<article class="slds-card">
<div class="slds-card__header">
Welcome to the castle. We have a strict quota of {!v.personQuota} citizens
</div>
<div class="slds-card__body">
<ui:outputNumber value="{!v.currentPeople}"/> People<br />
<ui:button press="{!c.attemptEntry}" label="Enter"/>
</div>
</article>
</div>
</div>
</aura:component>
and then commented the components in wrapper however this seems wrong to me, but it was not letting me save.
<aura:component implements="force:appHostable" access="global">
<!--<c:LTNG_Access_Control_Challenge guardAsleep="{!v.sleepingGuard}"/>-->
<div class="slds-row slds-align--absolute-center">
<div class="slds-size--3-of-6">
<div class="slds-row slds-align--absolute-center">
<div class="slds-panel slds-size--4-of-6 ">
<h2 class="slds-text-heading--medium">Welcome to the castle. Be warned, a guard will keep the castle from going over its person allocation</h2>
<ui:inputCheckbox label="Guard Asleep?" value="{!v.sleepingGuard}" />
</div>
<div class="slds-pabel slds-size--2-of-6">
<!--<c:LTNG_Access_Control_Challenge guardAsleep="{!v.sleepingGuard}"/>-->
</div>
</div>
</div>
</div>
<hr />
<div class="slds-row slds-align--absolute-center">
<div class="slds-size--4-of-6">
<c:CodeInstructions componentName="LTNG_Access_Control_Demo" />
</div>
</div>
</aura:component>
Can you please what needs to be done?
what you want to do is not completely block off the component. You still want to have the c:LTNG_Access_Control_Challenge to be called, but you just dont want to pass in the checkbox value. Its not very clear I think from the trailhead instructions what you are supposed to do but that should sort it out for you now.
cheers
Marty