File tree 1 file changed +8
-1
lines changed
src/umbraco.cms/businesslogic/web
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -494,7 +494,14 @@ public static bool HasAccess(int DocumentId, member.Member Member)
494
494
return hasAccess ;
495
495
}
496
496
497
+ [ Obsolete ( "This method has been replaced because of a spelling mistake. Use the HasAccess method instead." , false ) ]
497
498
public static bool HasAccces ( int documentId , object memberId )
499
+ {
500
+ // Call the correctly named version of this method
501
+ return HasAccess ( documentId , memberId ) ;
502
+ }
503
+
504
+ public static bool HasAccess ( int documentId , object memberId )
498
505
{
499
506
bool hasAccess = false ;
500
507
var node = new CMSNode ( documentId ) ;
@@ -511,7 +518,7 @@ public static bool HasAccces(int documentId, object memberId)
511
518
512
519
if ( member != null )
513
520
{
514
- foreach ( string role in Roles . GetRolesForUser ( ) )
521
+ foreach ( string role in Roles . GetRolesForUser ( member . UserName ) )
515
522
{
516
523
if ( currentNode . SelectSingleNode ( "./group [@id='" + role + "']" ) != null )
517
524
{
You can’t perform that action at this time.
0 commit comments