Skip to content

Commit a2a458f

Browse files
committed
3.0.2 fix for users not being shown the new button when they have no edit role
1 parent cccaa56 commit a2a458f

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
33
Adheres to [Semantic Versioning](http://semver.org/).
44

55
---
6+
## 3.0.2
7+
8+
##### Bug Fixes
9+
* fixes a bug where users with the no edit role were not being shown the create button
10+
611
## 3.0.1
712

813
##### Bug Fixes

MAGE.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3578,7 +3578,7 @@
35783578
GCC_PREFIX_HEADER = "Mage/MAGE-Prefix.pch";
35793579
INFOPLIST_FILE = "Mage/MAGE-Info.plist";
35803580
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
3581-
MARKETING_VERSION = 3.0.1;
3581+
MARKETING_VERSION = 3.0.2;
35823582
OTHER_LDFLAGS = "$(inherited)";
35833583
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.mage;
35843584
PRODUCT_NAME = MAGE;
@@ -3612,7 +3612,7 @@
36123612
GCC_PREFIX_HEADER = "Mage/MAGE-Prefix.pch";
36133613
INFOPLIST_FILE = "Mage/MAGE-Info.plist";
36143614
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
3615-
MARKETING_VERSION = 3.0.1;
3615+
MARKETING_VERSION = 3.0.2;
36163616
OTHER_LDFLAGS = "$(inherited)";
36173617
PRODUCT_BUNDLE_IDENTIFIER = mil.nga.mage;
36183618
PRODUCT_NAME = MAGE;

Mage/MapViewController.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,6 @@ - (void) addMapButtons {
347347
[self.createFab setImage:[UIImage imageNamed:@"add_location"] forState:UIControlStateNormal];
348348
[self.createFab addTarget:self action:@selector(createNewObservation:) forControlEvents:UIControlEventTouchUpInside];
349349
self.createFab.accessibilityLabel = @"New";
350-
User *currentUser = [User fetchCurrentUserInManagedObjectContext:[NSManagedObjectContext MR_defaultContext]];
351-
[self.createFab setHidden:![currentUser hasEditPermission]];
352350

353351
[buttonStack addArrangedSubview:self.trackingButton];
354352
[buttonStack addArrangedSubview:self.reportLocationButton];

Mage/ObservationTableViewController.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ class ObservationTableViewController: UITableViewController {
148148
self.navigationController?.view.addSubview(createFab);
149149
self.createFab.autoPinEdge(toSuperviewMargin: .right);
150150
self.createFab.autoPinEdge(toSuperviewMargin: .bottom, withInset: 25);
151-
let user = User.fetchCurrentUser(in: NSManagedObjectContext.mr_default())
152-
createFab.isHidden = !user.hasEditPermission()
153151
self.applyTheme(withContainerScheme: self.scheme);
154152
setupFilterListeners();
155153

0 commit comments

Comments
 (0)